@@ -193,7 +193,7 @@ |
||
| 193 | 193 | $folder .= DIRECTORY_SEPARATOR; |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - $this->outputPath = $folder . $this->getOutputFileName(); |
|
| 196 | + $this->outputPath = $folder.$this->getOutputFileName(); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | return $this->outputPath; |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | /** @var SettingsProviderInterface $settingsProvider */ |
| 163 | 163 | $settingsProvider = $container->get(SettingsProviderInterface::class); |
| 164 | 164 | |
| 165 | - $dataTemplates = function () use ($settingsProvider, $fileSystem, $singular, $plural) : array { |
|
| 165 | + $dataTemplates = function() use ($settingsProvider, $fileSystem, $singular, $plural) : array { |
|
| 166 | 166 | return [ |
| 167 | 167 | $this->composeMigration($settingsProvider, $fileSystem, $singular, $plural), |
| 168 | 168 | $this->composeSeed($settingsProvider, $fileSystem, $singular, $plural), |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | ]; |
| 171 | 171 | }; |
| 172 | 172 | |
| 173 | - $basicTemplates = function () use ($settingsProvider, $fileSystem, $singular, $plural) : array { |
|
| 173 | + $basicTemplates = function() use ($settingsProvider, $fileSystem, $singular, $plural) : array { |
|
| 174 | 174 | return [ |
| 175 | 175 | $this->composeSchema($settingsProvider, $fileSystem, $singular, $plural), |
| 176 | 176 | $this->composeAuthorization($settingsProvider, $fileSystem, $singular, $plural), |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | ]; |
| 181 | 181 | }; |
| 182 | 182 | |
| 183 | - $webTemplates = function () use ($settingsProvider, $fileSystem, $singular, $plural) : array { |
|
| 183 | + $webTemplates = function() use ($settingsProvider, $fileSystem, $singular, $plural) : array { |
|
| 184 | 184 | return [ |
| 185 | 185 | $this->composeWebValidationOnCreateRules($settingsProvider, $fileSystem, $singular), |
| 186 | 186 | $this->composeWebValidationOnUpdateRules($settingsProvider, $fileSystem, $singular), |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | ]; |
| 190 | 190 | }; |
| 191 | 191 | |
| 192 | - $jsonTemplates = function () use ($settingsProvider, $fileSystem, $singular, $plural) : array { |
|
| 192 | + $jsonTemplates = function() use ($settingsProvider, $fileSystem, $singular, $plural) : array { |
|
| 193 | 193 | return [ |
| 194 | 194 | $this->composeJsonValidationOnCreateRules($settingsProvider, $fileSystem, $singular), |
| 195 | 195 | $this->composeJsonValidationOnUpdateRules($settingsProvider, $fileSystem, $singular), |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | )); |
| 228 | 228 | break; |
| 229 | 229 | default: |
| 230 | - $inOut->writeError("Unsupported item type `$item`." . PHP_EOL); |
|
| 230 | + $inOut->writeError("Unsupported item type `$item`.".PHP_EOL); |
|
| 231 | 231 | break; |
| 232 | 232 | } |
| 233 | 233 | } |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | $folder = $settingsProvider->get(DataSettingsInterface::class)[DataSettingsInterface::KEY_MIGRATIONS_FOLDER]; |
| 250 | 250 | |
| 251 | 251 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 252 | - $outputFileName = $plural . 'Migration.php'; |
|
| 252 | + $outputFileName = $plural.'Migration.php'; |
|
| 253 | 253 | $outputContent = $this->composeTemplateContent( |
| 254 | 254 | $fileSystem, |
| 255 | 255 | $this->getTemplatePath('Migration.txt'), |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $folder = $settingsProvider->get(DataSettingsInterface::class)[DataSettingsInterface::KEY_SEEDS_FOLDER]; |
| 280 | 280 | |
| 281 | 281 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 282 | - $outputFileName = $plural . 'Seed.php'; |
|
| 282 | + $outputFileName = $plural.'Seed.php'; |
|
| 283 | 283 | $outputContent = $this->composeTemplateContent( |
| 284 | 284 | $fileSystem, |
| 285 | 285 | $this->getTemplatePath('Seed.txt'), |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | $folder = $settingsProvider->get(DataSettingsInterface::class)[DataSettingsInterface::KEY_MODELS_FOLDER]; |
| 310 | 310 | |
| 311 | 311 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 312 | - $outputFileName = $singular . '.php'; |
|
| 312 | + $outputFileName = $singular.'.php'; |
|
| 313 | 313 | $outputContent = $this->composeTemplateContent( |
| 314 | 314 | $fileSystem, |
| 315 | 315 | $this->getTemplatePath('Model.txt'), |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | $folder = $settingsProvider->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_SCHEMAS_FOLDER]; |
| 343 | 343 | |
| 344 | 344 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 345 | - $outputFileName = $singular . 'Schema.php'; |
|
| 345 | + $outputFileName = $singular.'Schema.php'; |
|
| 346 | 346 | $outputContent = $this->composeTemplateContent( |
| 347 | 347 | $fileSystem, |
| 348 | 348 | $this->getTemplatePath('Schema.txt'), |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | $folder = $settingsProvider->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_API_FOLDER]; |
| 373 | 373 | |
| 374 | 374 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 375 | - $outputFileName = $plural . 'Api.php'; |
|
| 375 | + $outputFileName = $plural.'Api.php'; |
|
| 376 | 376 | $outputContent = $this->composeTemplateContent( |
| 377 | 377 | $fileSystem, |
| 378 | 378 | $this->getTemplatePath('Api.txt'), |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | ->get(AuthorizationSettingsInterface::class)[AuthorizationSettingsInterface::KEY_POLICIES_FOLDER]; |
| 406 | 406 | |
| 407 | 407 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 408 | - $outputFileName = $singular . 'Rules.php'; |
|
| 408 | + $outputFileName = $singular.'Rules.php'; |
|
| 409 | 409 | $outputContent = $this->composeTemplateContent( |
| 410 | 410 | $fileSystem, |
| 411 | 411 | $this->getTemplatePath('ApiAuthorization.txt'), |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATION_RULES_FOLDER]; |
| 440 | 440 | |
| 441 | 441 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 442 | - $outputFileName = $singular . 'Rules.php'; |
|
| 442 | + $outputFileName = $singular.'Rules.php'; |
|
| 443 | 443 | $outputContent = $this->composeTemplateContent( |
| 444 | 444 | $fileSystem, |
| 445 | 445 | $this->getTemplatePath('ValidationRules.txt'), |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
| 470 | 470 | |
| 471 | 471 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 472 | - $outputFileName = $singular . 'CreateJson.php'; |
|
| 472 | + $outputFileName = $singular.'CreateJson.php'; |
|
| 473 | 473 | $outputContent = $this->composeTemplateContent( |
| 474 | 474 | $fileSystem, |
| 475 | 475 | $this->getTemplatePath('JsonRulesOnCreate.txt'), |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
| 499 | 499 | |
| 500 | 500 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 501 | - $outputFileName = $singular . 'UpdateJson.php'; |
|
| 501 | + $outputFileName = $singular.'UpdateJson.php'; |
|
| 502 | 502 | $outputContent = $this->composeTemplateContent( |
| 503 | 503 | $fileSystem, |
| 504 | 504 | $this->getTemplatePath('JsonRulesOnUpdate.txt'), |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
| 531 | 531 | |
| 532 | 532 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 533 | - $outputFileName = $plural . 'ReadQuery.php'; |
|
| 533 | + $outputFileName = $plural.'ReadQuery.php'; |
|
| 534 | 534 | $outputContent = $this->composeTemplateContent( |
| 535 | 535 | $fileSystem, |
| 536 | 536 | $this->getTemplatePath('QueryRulesOnRead.txt'), |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_CONTROLLERS_FOLDER]; |
| 562 | 562 | |
| 563 | 563 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 564 | - $outputFileName = $plural . 'Controller.php'; |
|
| 564 | + $outputFileName = $plural.'Controller.php'; |
|
| 565 | 565 | $outputContent = $this->composeTemplateContent( |
| 566 | 566 | $fileSystem, |
| 567 | 567 | $this->getTemplatePath('JsonController.txt'), |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | $folder = $settingsProvider->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_ROUTES_FOLDER]; |
| 592 | 592 | |
| 593 | 593 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 594 | - $outputFileName = $singular . 'ApiRoutes.php'; |
|
| 594 | + $outputFileName = $singular.'ApiRoutes.php'; |
|
| 595 | 595 | $outputContent = $this->composeTemplateContent( |
| 596 | 596 | $fileSystem, |
| 597 | 597 | $this->getTemplatePath('JsonRoutes.txt'), |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
| 621 | 621 | |
| 622 | 622 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 623 | - $outputFileName = $singular . 'CreateForm.php'; |
|
| 623 | + $outputFileName = $singular.'CreateForm.php'; |
|
| 624 | 624 | $outputContent = $this->composeTemplateContent( |
| 625 | 625 | $fileSystem, |
| 626 | 626 | $this->getTemplatePath('WebRulesOnCreate.txt'), |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
| 649 | 649 | |
| 650 | 650 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 651 | - $outputFileName = $singular . 'UpdateForm.php'; |
|
| 651 | + $outputFileName = $singular.'UpdateForm.php'; |
|
| 652 | 652 | $outputContent = $this->composeTemplateContent( |
| 653 | 653 | $fileSystem, |
| 654 | 654 | $this->getTemplatePath('WebRulesOnUpdate.txt'), |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_WEB_CONTROLLERS_FOLDER]; |
| 679 | 679 | |
| 680 | 680 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 681 | - $outputFileName = $plural . 'Controller.php'; |
|
| 681 | + $outputFileName = $plural.'Controller.php'; |
|
| 682 | 682 | $outputContent = $this->composeTemplateContent( |
| 683 | 683 | $fileSystem, |
| 684 | 684 | $this->getTemplatePath('WebController.txt'), |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | $folder = $settingsProvider->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_ROUTES_FOLDER]; |
| 711 | 711 | |
| 712 | 712 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 713 | - $outputFileName = $singular . 'WebRoutes.php'; |
|
| 713 | + $outputFileName = $singular.'WebRoutes.php'; |
|
| 714 | 714 | $outputContent = $this->composeTemplateContent( |
| 715 | 715 | $fileSystem, |
| 716 | 716 | $this->getTemplatePath('WebRoutes.txt'), |
@@ -820,7 +820,7 @@ discard block |
||
| 820 | 820 | { |
| 821 | 821 | $mask = '**'; |
| 822 | 822 | |
| 823 | - $folder = str_replace($mask . DIRECTORY_SEPARATOR, '', $folder); |
|
| 823 | + $folder = str_replace($mask.DIRECTORY_SEPARATOR, '', $folder); |
|
| 824 | 824 | $folder = str_replace($mask, '', $folder); |
| 825 | 825 | |
| 826 | 826 | return $folder; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $this->executeClear($container, $inOut); |
| 124 | 124 | break; |
| 125 | 125 | default: |
| 126 | - $inOut->writeError("Unsupported action `$action`." . PHP_EOL); |
|
| 126 | + $inOut->writeError("Unsupported action `$action`.".PHP_EOL); |
|
| 127 | 127 | break; |
| 128 | 128 | } |
| 129 | 129 | } |
@@ -153,13 +153,13 @@ discard block |
||
| 153 | 153 | $fileSystem = $this->getFileSystem($container); |
| 154 | 154 | if ($fileSystem->exists($path) === true) { |
| 155 | 155 | $fileSystem->delete($path); |
| 156 | - $inOut->writeInfo("Cache file deleted `$path`." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
| 156 | + $inOut->writeInfo("Cache file deleted `$path`.".PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
| 157 | 157 | |
| 158 | 158 | return; |
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - $inOut->writeInfo('Cache already clean.' . PHP_EOL); |
|
| 162 | + $inOut->writeInfo('Cache already clean.'.PHP_EOL); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -189,11 +189,11 @@ discard block |
||
| 189 | 189 | $settingsData = $settingsProvider->serialize(); |
| 190 | 190 | $content = $this->composeContent($settingsData, $namespace, $class, $method); |
| 191 | 191 | |
| 192 | - $path = $cacheDir . DIRECTORY_SEPARATOR . $class . '.php'; |
|
| 192 | + $path = $cacheDir.DIRECTORY_SEPARATOR.$class.'.php'; |
|
| 193 | 193 | $this->getFileSystem($container)->write($path, $content); |
| 194 | 194 | |
| 195 | - $inOut->writeInfo('Cache created.' . PHP_EOL); |
|
| 196 | - $inOut->writeInfo("Cache written to `$path`." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
| 195 | + $inOut->writeInfo('Cache created.'.PHP_EOL); |
|
| 196 | + $inOut->writeInfo("Cache written to `$path`.".PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | /** |
@@ -260,8 +260,8 @@ discard block |
||
| 260 | 260 | |
| 261 | 261 | assert( |
| 262 | 262 | $data !== null, |
| 263 | - 'It seems the data are not exportable. It is likely to be caused by class instances ' . |
|
| 264 | - 'that do not implement ` __set_state` magic method required by `var_export`. ' . |
|
| 263 | + 'It seems the data are not exportable. It is likely to be caused by class instances '. |
|
| 264 | + 'that do not implement ` __set_state` magic method required by `var_export`. '. |
|
| 265 | 265 | 'See http://php.net/manual/en/language.oop5.magic.php#object.set-state for more details.' |
| 266 | 266 | ); |
| 267 | 267 | |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 41 | 41 | { |
| 42 | 42 | $container[ThrowableHandlerInterface::class] = |
| 43 | - function (PsrContainerInterface $container): ThrowableHandlerInterface { |
|
| 43 | + function(PsrContainerInterface $container): ThrowableHandlerInterface { |
|
| 44 | 44 | $isCli = php_sapi_name() === 'cli'; |
| 45 | 45 | |
| 46 | 46 | return $isCli === true ? new WhoopsThrowableTextHandler() : new WhoopsThrowableHtmlHandler(); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 42 | 42 | { |
| 43 | 43 | $storage = null; |
| 44 | - $factory = function (PsrContainerInterface $container) use (&$storage) { |
|
| 44 | + $factory = function(PsrContainerInterface $container) use (&$storage) { |
|
| 45 | 45 | if ($storage === null) { |
| 46 | 46 | $storage = static::createStorage($container); |
| 47 | 47 | } |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | $expectedRet = ResponseInterface::class; |
| 96 | 96 | assert( |
| 97 | 97 | $this->checkPublicStaticCallable($errorResponseMethod, $expectedArgs, $expectedRet) === true, |
| 98 | - 'CSRF error response method should have signature ' . |
|
| 98 | + 'CSRF error response method should have signature '. |
|
| 99 | 99 | '(ContainerInterface, ServerRequestInterface): ResponseInterface.' |
| 100 | 100 | ); |
| 101 | 101 | |
@@ -176,22 +176,22 @@ |
||
| 176 | 176 | public function __construct() |
| 177 | 177 | { |
| 178 | 178 | $this |
| 179 | - ->setRetrieveCallable(function (string $key) { |
|
| 179 | + ->setRetrieveCallable(function(string $key) { |
|
| 180 | 180 | return $_SESSION[$key]; |
| 181 | 181 | }) |
| 182 | - ->setPutCallable(function (string $key, $serializable): void { |
|
| 182 | + ->setPutCallable(function(string $key, $serializable): void { |
|
| 183 | 183 | $_SESSION[$key] = $serializable; |
| 184 | 184 | }) |
| 185 | - ->setHasCallable(function (string $key): bool { |
|
| 185 | + ->setHasCallable(function(string $key): bool { |
|
| 186 | 186 | return array_key_exists($key, $_SESSION); |
| 187 | 187 | }) |
| 188 | - ->setDeleteCallable(function (string $key): void { |
|
| 188 | + ->setDeleteCallable(function(string $key): void { |
|
| 189 | 189 | unset($_SESSION[$key]); |
| 190 | 190 | }) |
| 191 | - ->setIteratorCallable(function (): Iterator { |
|
| 191 | + ->setIteratorCallable(function(): Iterator { |
|
| 192 | 192 | return new ArrayIterator($_SESSION); |
| 193 | 193 | }) |
| 194 | - ->setCouldBeStartedCallable(function (): bool { |
|
| 194 | + ->setCouldBeStartedCallable(function(): bool { |
|
| 195 | 195 | return session_status() === PHP_SESSION_NONE; |
| 196 | 196 | }) |
| 197 | 197 | ->setAbortCallable('\session_abort') |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | if ($reflectionMethod->isPublic() === true && |
| 114 | 114 | $reflectionMethod->isStatic() === true && |
| 115 | 115 | $reflectionMethod->hasReturnType() === true && |
| 116 | - (string)$reflectionMethod->getReturnType() === 'bool' && |
|
| 116 | + (string) $reflectionMethod->getReturnType() === 'bool' && |
|
| 117 | 117 | $reflectionMethod->getNumberOfParameters() === 1 && |
| 118 | 118 | $reflectionMethod->getParameters()[0]->getClass()->implementsInterface(ContextInterface::class) === true |
| 119 | 119 | ) { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | $policy = (new Policy($rules, RuleAlgorithm::firstApplicable())) |
| 165 | - ->setName($policiesName . ' -> ResourceType' . "=`$resourcesType`") |
|
| 165 | + ->setName($policiesName.' -> ResourceType'."=`$resourcesType`") |
|
| 166 | 166 | ->setTarget($this->target(RequestProperties::REQ_RESOURCE_TYPE, $resourcesType)); |
| 167 | 167 | |
| 168 | 168 | return $policy; |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | public function setData(array $data): self |
| 111 | 111 | { |
| 112 | 112 | list($this->foreignKeys, $this->belongsToMany, $this->relationshipTypes, |
| 113 | - $this->reversedRelationships,$this->tableNames, $this->primaryKeys, |
|
| 113 | + $this->reversedRelationships, $this->tableNames, $this->primaryKeys, |
|
| 114 | 114 | $this->attributeTypes, $this->attributeLengths, $this->attributes, $this->rawAttributes, |
| 115 | 115 | $this->reversedClasses) = $data; |
| 116 | 116 | |