@@ -38,14 +38,14 @@ discard block |
||
| 38 | 38 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 39 | 39 | { |
| 40 | 40 | $container[ModelSchemaInfoInterface::class] = |
| 41 | - function (PsrContainerInterface $container): ModelSchemaInfoInterface { |
|
| 41 | + function(PsrContainerInterface $container): ModelSchemaInfoInterface { |
|
| 42 | 42 | $settings = $container->get(SettingsProviderInterface::class)->get(DataSettings::class); |
| 43 | 43 | $data = $settings[DataSettings::KEY_MODELS_SCHEMA_INFO]; |
| 44 | 44 | |
| 45 | 45 | return (new ModelSchemaInfo())->setData($data); |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | - $container[Connection::class] = function (PsrContainerInterface $container): Connection { |
|
| 48 | + $container[Connection::class] = function(PsrContainerInterface $container): Connection { |
|
| 49 | 49 | $settings = $container->get(SettingsProviderInterface::class)->get(DoctrineSettings::class); |
| 50 | 50 | $params = array_filter([ |
| 51 | 51 | 'driver' => $settings[DoctrineSettings::KEY_DRIVER] ?? null, |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | 'memory' => $settings[DoctrineSettings::KEY_MEMORY] ?? null, |
| 59 | 59 | 'path' => $settings[DoctrineSettings::KEY_PATH] ?? null, |
| 60 | 60 | 'charset' => $settings[DoctrineSettings::KEY_CHARSET] ?? 'UTF8', |
| 61 | - ], function ($value) { |
|
| 61 | + ], function($value) { |
|
| 62 | 62 | return $value !== null; |
| 63 | 63 | }); |
| 64 | - $extra = $settings[DoctrineSettings::KEY_EXTRA] ?? []; |
|
| 64 | + $extra = $settings[DoctrineSettings::KEY_EXTRA] ?? []; |
|
| 65 | 65 | |
| 66 | 66 | $connection = DriverManager::getConnection($params + $extra); |
| 67 | 67 | |
@@ -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; |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | string $plural |
| 403 | 403 | ): TemplateOutput { |
| 404 | 404 | $folder = $settingsProvider |
| 405 | - ->get(AuthorizationSettingsInterface::class)[AuthorizationSettingsInterface::KEY_POLICIES_FOLDER]; |
|
| 405 | + ->get(AuthorizationSettingsInterface::class)[AuthorizationSettingsInterface::KEY_POLICIES_FOLDER]; |
|
| 406 | 406 | |
| 407 | 407 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 408 | 408 | $outputFileName = $singular . 'Rules.php'; |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | string $plural |
| 437 | 437 | ): TemplateOutput { |
| 438 | 438 | $folder = $settingsProvider |
| 439 | - ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATION_RULES_FOLDER]; |
|
| 439 | + ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATION_RULES_FOLDER]; |
|
| 440 | 440 | |
| 441 | 441 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 442 | 442 | $outputFileName = $singular . 'Rules.php'; |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | string $singular |
| 467 | 467 | ): TemplateOutput { |
| 468 | 468 | $folder = $settingsProvider |
| 469 | - ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 469 | + ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 470 | 470 | |
| 471 | 471 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 472 | 472 | $outputFileName = $singular . 'CreateJson.php'; |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | string $singular |
| 496 | 496 | ): TemplateOutput { |
| 497 | 497 | $folder = $settingsProvider |
| 498 | - ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 498 | + ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 499 | 499 | |
| 500 | 500 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 501 | 501 | $outputFileName = $singular . 'UpdateJson.php'; |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | string $plural |
| 528 | 528 | ): TemplateOutput { |
| 529 | 529 | $folder = $settingsProvider |
| 530 | - ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 530 | + ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 531 | 531 | |
| 532 | 532 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 533 | 533 | $outputFileName = $plural . 'ReadQuery.php'; |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | string $plural |
| 559 | 559 | ): TemplateOutput { |
| 560 | 560 | $folder = $settingsProvider |
| 561 | - ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_CONTROLLERS_FOLDER]; |
|
| 561 | + ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_CONTROLLERS_FOLDER]; |
|
| 562 | 562 | |
| 563 | 563 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 564 | 564 | $outputFileName = $plural . 'Controller.php'; |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | string $singular |
| 618 | 618 | ): TemplateOutput { |
| 619 | 619 | $folder = $settingsProvider |
| 620 | - ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 620 | + ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 621 | 621 | |
| 622 | 622 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 623 | 623 | $outputFileName = $singular . 'CreateForm.php'; |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | string $singular |
| 646 | 646 | ): TemplateOutput { |
| 647 | 647 | $folder = $settingsProvider |
| 648 | - ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 648 | + ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_JSON_VALIDATORS_FOLDER]; |
|
| 649 | 649 | |
| 650 | 650 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 651 | 651 | $outputFileName = $singular . 'UpdateForm.php'; |
@@ -675,7 +675,7 @@ discard block |
||
| 675 | 675 | string $plural |
| 676 | 676 | ): TemplateOutput { |
| 677 | 677 | $folder = $settingsProvider |
| 678 | - ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_WEB_CONTROLLERS_FOLDER]; |
|
| 678 | + ->get(FluteSettingsInterface::class)[FluteSettingsInterface::KEY_WEB_CONTROLLERS_FOLDER]; |
|
| 679 | 679 | |
| 680 | 680 | $outputRootFolder = $this->filterOutFolderMask($folder); |
| 681 | 681 | $outputFileName = $plural . 'Controller.php'; |
@@ -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(); |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | /** |
| 107 | 107 | * @param ContainerInterface $container |
| 108 | 108 | * |
| 109 | - * @return array |
|
| 109 | + * @return ServerRequestInterface |
|
| 110 | 110 | */ |
| 111 | 111 | private static function getCsrfSettings(ContainerInterface $container): array |
| 112 | 112 | { |
@@ -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') |