@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 45 | 45 | { |
| 46 | - $container[LoggerInterface::class] = function (PsrContainerInterface $container) { |
|
| 46 | + $container[LoggerInterface::class] = function(PsrContainerInterface $container) { |
|
| 47 | 47 | /** @var CacheSettingsProviderInterface $settingsProvider */ |
| 48 | 48 | $settingsProvider = $container->get(CacheSettingsProviderInterface::class); |
| 49 | 49 | $appConfig = $settingsProvider->getApplicationConfiguration(); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ); |
| 66 | 66 | assert(empty($logFile) === false, "Invalid Logs file name `$logFile`."); |
| 67 | 67 | |
| 68 | - $logPath = $logFolder . DIRECTORY_SEPARATOR . $logFile; |
|
| 68 | + $logPath = $logFolder.DIRECTORY_SEPARATOR.$logFile; |
|
| 69 | 69 | |
| 70 | 70 | return $defaults + [static::KEY_LOG_PATH => $logPath]; |
| 71 | 71 | } |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | $appConfig = $this->getAppConfig(); |
| 79 | 79 | |
| 80 | - $isDebug = (bool)($appConfig[A::KEY_IS_DEBUG] ?? false); |
|
| 80 | + $isDebug = (bool) ($appConfig[A::KEY_IS_DEBUG] ?? false); |
|
| 81 | 81 | |
| 82 | 82 | return [ |
| 83 | - static::KEY_IS_ENABLED => (bool)($appConfig[A::KEY_IS_LOG_ENABLED] ?? false), |
|
| 83 | + static::KEY_IS_ENABLED => (bool) ($appConfig[A::KEY_IS_LOG_ENABLED] ?? false), |
|
| 84 | 84 | static::KEY_LOG_LEVEL => $isDebug === true ? Logger::DEBUG : Logger::INFO, |
| 85 | 85 | static::KEY_LOG_FILE => 'limoncello.log', |
| 86 | 86 | ]; |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | public function setData(array $data): self |
| 105 | 105 | { |
| 106 | 106 | list($this->foreignKeys, $this->belongsToMany, $this->relationshipTypes, |
| 107 | - $this->reversedRelationships,$this->tableNames, $this->primaryKeys, |
|
| 107 | + $this->reversedRelationships, $this->tableNames, $this->primaryKeys, |
|
| 108 | 108 | $this->attributeTypes, $this->attributeLengths, $this->attributes, $this->reversedClasses) = $data; |
| 109 | 109 | |
| 110 | 110 | return $this; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | ); |
| 89 | 89 | assert(file_exists($seedsListFile) === true, "Invalid Seeds file `$seedsListFile`."); |
| 90 | 90 | |
| 91 | - $modelsPath = $modelsFolder . DIRECTORY_SEPARATOR . $modelsFileMask; |
|
| 91 | + $modelsPath = $modelsFolder.DIRECTORY_SEPARATOR.$modelsFileMask; |
|
| 92 | 92 | |
| 93 | 93 | $seedInit = $defaults[static::KEY_SEED_INIT] ?? null; |
| 94 | 94 | assert( |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | $registered = []; |
| 131 | 131 | $modelSchemas = new ModelSchemaInfo(); |
| 132 | - $registerModel = function ($modelClass) use ($modelSchemas, &$registered, $requireReverseRel) { |
|
| 132 | + $registerModel = function($modelClass) use ($modelSchemas, &$registered, $requireReverseRel) { |
|
| 133 | 133 | /** @var ModelInterface $modelClass */ |
| 134 | 134 | $modelSchemas->registerClass( |
| 135 | 135 | $modelClass, |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | foreach ($relationships[RelationshipTypes::BELONGS_TO] as $relName => list($rClass, $fKey, $rRel)) { |
| 146 | 146 | /** @var string $rClass */ |
| 147 | 147 | $modelSchemas->registerBelongsToOneRelationship($modelClass, $relName, $fKey, $rClass, $rRel); |
| 148 | - $registered[(string)$modelClass][$relName] = true; |
|
| 148 | + $registered[(string) $modelClass][$relName] = true; |
|
| 149 | 149 | $registered[$rClass][$rRel] = true; |
| 150 | 150 | |
| 151 | 151 | // Sanity check. Every `belongs_to` should be paired with `has_many` on the other side. |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $rRelationships[RelationshipTypes::HAS_MANY][$rRel] === [$modelClass, $fKey, $relName]); |
| 157 | 157 | /** @var string $modelClass */ |
| 158 | 158 | |
| 159 | - assert($isRelationshipOk, "`belongsTo` relationship `$relName` of class $modelClass " . |
|
| 159 | + assert($isRelationshipOk, "`belongsTo` relationship `$relName` of class $modelClass ". |
|
| 160 | 160 | "should be paired with `hasMany` relationship."); |
| 161 | 161 | } |
| 162 | 162 | } |
@@ -170,14 +170,14 @@ discard block |
||
| 170 | 170 | (isset($rRelationships[RelationshipTypes::BELONGS_TO][$rRel]) === true && |
| 171 | 171 | $rRelationships[RelationshipTypes::BELONGS_TO][$rRel] === [$modelClass, $fKey, $relName]); |
| 172 | 172 | /** @var string $modelClass */ |
| 173 | - assert($isRelationshipOk, "`hasMany` relationship `$relName` of class $modelClass " . |
|
| 173 | + assert($isRelationshipOk, "`hasMany` relationship `$relName` of class $modelClass ". |
|
| 174 | 174 | "should be paired with `belongsTo` relationship."); |
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | if (array_key_exists(RelationshipTypes::BELONGS_TO_MANY, $relationships) === true) { |
| 179 | 179 | foreach ($relationships[RelationshipTypes::BELONGS_TO_MANY] as $relName => $data) { |
| 180 | - if (isset($registered[(string)$modelClass][$relName]) === true) { |
|
| 180 | + if (isset($registered[(string) $modelClass][$relName]) === true) { |
|
| 181 | 181 | continue; |
| 182 | 182 | } |
| 183 | 183 | /** @var string $rClass */ |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | $rClass, |
| 192 | 192 | $rRel |
| 193 | 193 | ); |
| 194 | - $registered[(string)$modelClass][$relName] = true; |
|
| 194 | + $registered[(string) $modelClass][$relName] = true; |
|
| 195 | 195 | $registered[$rClass][$rRel] = true; |
| 196 | 196 | } |
| 197 | 197 | } |
@@ -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; |
@@ -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(); |