@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 39 | 39 | { |
| 40 | 40 | $container[CommandStorageInterface::class] = |
| 41 | - function (PsrContainerInterface $container): CommandStorageInterface { |
|
| 41 | + function(PsrContainerInterface $container): CommandStorageInterface { |
|
| 42 | 42 | $creator = new class |
| 43 | 43 | { |
| 44 | 44 | use ClassIsTrait; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $providerClasses = $settings[S::KEY_PROVIDER_CLASSES]; |
| 80 | 80 | $commandsFolder = $settings[S::KEY_COMMANDS_FOLDER]; |
| 81 | 81 | $commandsFileMask = $settings[S::KEY_COMMANDS_FILE_MASK] ?? '*.php'; |
| 82 | - $commandsPath = $commandsFolder . DIRECTORY_SEPARATOR . $commandsFileMask; |
|
| 82 | + $commandsPath = $commandsFolder.DIRECTORY_SEPARATOR.$commandsFileMask; |
|
| 83 | 83 | |
| 84 | 84 | $storage = $creator->createCommandStorage($commandsPath, $providerClasses); |
| 85 | 85 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | if ($reflectionMethod->isPublic() === true && |
| 105 | 105 | $reflectionMethod->isStatic() === true && |
| 106 | 106 | $reflectionMethod->hasReturnType() === true && |
| 107 | - (string)$reflectionMethod->getReturnType() === 'bool' && |
|
| 107 | + (string) $reflectionMethod->getReturnType() === 'bool' && |
|
| 108 | 108 | $reflectionMethod->getNumberOfParameters() === 1 && |
| 109 | 109 | $reflectionMethod->getParameters()[0]->getClass()->implementsInterface(ContextInterface::class) === true |
| 110 | 110 | ) { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | $policy = (new Policy($rules, RuleAlgorithm::firstApplicable())) |
| 156 | - ->setName($policiesName . ' -> ' . RequestProperties::REQ_RESOURCE_TYPE . "=`$resourcesType`") |
|
| 156 | + ->setName($policiesName.' -> '.RequestProperties::REQ_RESOURCE_TYPE."=`$resourcesType`") |
|
| 157 | 157 | ->setTarget($this->target(RequestProperties::REQ_RESOURCE_TYPE, $resourcesType)); |
| 158 | 158 | |
| 159 | 159 | return $policy; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 37 | 37 | { |
| 38 | 38 | $container[ThrowableHandlerInterface::class] = |
| 39 | - function (PsrContainerInterface $container): ThrowableHandlerInterface { |
|
| 39 | + function(PsrContainerInterface $container): ThrowableHandlerInterface { |
|
| 40 | 40 | return new WhoopsThrowableHandler(); |
| 41 | 41 | }; |
| 42 | 42 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | |
| 93 | 93 | $routeConfigurators = []; |
| 94 | 94 | if (empty($method) === false && empty($path) === false) { |
| 95 | - list(, , , , , $routeConfigurators) = $this->initRouter($coreSettings)->match($method, $path); |
|
| 95 | + list(,,,,, $routeConfigurators) = $this->initRouter($coreSettings)->match($method, $path); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | // configure container |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 40 | 40 | { |
| 41 | - $container[AnalyzerInterface::class] = function (PsrContainerInterface $container) { |
|
| 41 | + $container[AnalyzerInterface::class] = function(PsrContainerInterface $container) { |
|
| 42 | 42 | $settingsProvider = $container->get(SettingsProviderInterface::class); |
| 43 | 43 | $corsSettings = $settingsProvider->get(C::class); |
| 44 | 44 | $analyzer = Analyzer::instance(new Settings($corsSettings)); |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | */ |
| 151 | 151 | public function setExpiresInSeconds(int $seconds): CookieInterface |
| 152 | 152 | { |
| 153 | - return $this->setExpiresAtUnixTime(time() + (int)max(0, $seconds)); |
|
| 153 | + return $this->setExpiresAtUnixTime(time() + (int) max(0, $seconds)); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /** |
@@ -165,19 +165,19 @@ |
||
| 165 | 165 | public function __construct() |
| 166 | 166 | { |
| 167 | 167 | $this |
| 168 | - ->setRetrieveCallable(function (string $key) { |
|
| 168 | + ->setRetrieveCallable(function(string $key) { |
|
| 169 | 169 | return $_SESSION[$key]; |
| 170 | 170 | }) |
| 171 | - ->setPutCallable(function (string $key, $serializable): void { |
|
| 171 | + ->setPutCallable(function(string $key, $serializable): void { |
|
| 172 | 172 | $_SESSION[$key] = $serializable; |
| 173 | 173 | }) |
| 174 | - ->setHasCallable(function (string $key): bool { |
|
| 174 | + ->setHasCallable(function(string $key): bool { |
|
| 175 | 175 | return array_key_exists($key, $_SESSION); |
| 176 | 176 | }) |
| 177 | - ->setDeleteCallable(function (string $key): void { |
|
| 177 | + ->setDeleteCallable(function(string $key): void { |
|
| 178 | 178 | unset($_SESSION[$key]); |
| 179 | 179 | }) |
| 180 | - ->setIteratorCallable(function (): Iterator { |
|
| 180 | + ->setIteratorCallable(function(): Iterator { |
|
| 181 | 181 | return new ArrayIterator($_SESSION); |
| 182 | 182 | }) |
| 183 | 183 | ->setAbortCallable('\session_abort') |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | ); |
| 58 | 58 | assert(empty($logFile) === false, "Invalid Logs file name `$logFile`."); |
| 59 | 59 | |
| 60 | - $logPath = $logFolder . DIRECTORY_SEPARATOR . $logFile; |
|
| 60 | + $logPath = $logFolder.DIRECTORY_SEPARATOR.$logFile; |
|
| 61 | 61 | |
| 62 | 62 | return $defaults + [static::KEY_LOG_PATH => $logPath]; |
| 63 | 63 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 36 | 36 | { |
| 37 | - $container[SessionInterface::class] = function (PsrContainerInterface $container): SessionInterface { |
|
| 37 | + $container[SessionInterface::class] = function(PsrContainerInterface $container): SessionInterface { |
|
| 38 | 38 | /** @var SessionFunctionsInterface $functions */ |
| 39 | 39 | $functions = $container->get(SessionFunctionsInterface::class); |
| 40 | 40 | $session = new Session($functions); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | return $session; |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | - $container[SessionFunctionsInterface::class] = function (): SessionFunctionsInterface { |
|
| 45 | + $container[SessionFunctionsInterface::class] = function(): SessionFunctionsInterface { |
|
| 46 | 46 | $functions = new SessionFunctions(); |
| 47 | 47 | |
| 48 | 48 | return $functions; |