@@ -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 | |
@@ -85,10 +85,10 @@ discard block |
||
| 85 | 85 | { |
| 86 | 86 | foreach ($this->getMigrations($container) as $class) { |
| 87 | 87 | assert(is_string($class)); |
| 88 | - $this->getIO()->writeInfo("Starting migration for `$class`..." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
| 88 | + $this->getIO()->writeInfo("Starting migration for `$class`...".PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
| 89 | 89 | if (($migration = $this->createMigration($class, $container)) !== null) { |
| 90 | 90 | $migration->init($container)->migrate(); |
| 91 | - $this->getIO()->writeInfo("Migration finished for `$class`." . PHP_EOL, IoInterface::VERBOSITY_NORMAL); |
|
| 91 | + $this->getIO()->writeInfo("Migration finished for `$class`.".PHP_EOL, IoInterface::VERBOSITY_NORMAL); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -107,10 +107,10 @@ discard block |
||
| 107 | 107 | { |
| 108 | 108 | foreach ($this->getRollbacks($container) as $class) { |
| 109 | 109 | assert(is_string($class)); |
| 110 | - $this->getIO()->writeInfo("Starting rollback for `$class`..." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
| 110 | + $this->getIO()->writeInfo("Starting rollback for `$class`...".PHP_EOL, IoInterface::VERBOSITY_VERBOSE); |
|
| 111 | 111 | if (($migration = $this->createMigration($class, $container)) !== null) { |
| 112 | 112 | $migration->init($container)->rollback(); |
| 113 | - $this->getIO()->writeInfo("Rollback finished for `$class`." . PHP_EOL, IoInterface::VERBOSITY_NORMAL); |
|
| 113 | + $this->getIO()->writeInfo("Rollback finished for `$class`.".PHP_EOL, IoInterface::VERBOSITY_NORMAL); |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | /** @var MigrationInterface $migration */ |
| 311 | 311 | $migration = new $class($container); |
| 312 | 312 | } catch (Error $exception) { |
| 313 | - $this->getIO()->writeWarning("Migration `$class` not found." . PHP_EOL); |
|
| 313 | + $this->getIO()->writeWarning("Migration `$class` not found.".PHP_EOL); |
|
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | return $migration; |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public static function configureContainer(LimoncelloContainerInterface $container): void |
| 43 | 43 | { |
| 44 | - $container[AnalyzerInterface::class] = function (PsrContainerInterface $container) { |
|
| 44 | + $container[AnalyzerInterface::class] = function(PsrContainerInterface $container) { |
|
| 45 | 45 | $settingsProvider = $container->get(SettingsProviderInterface::class); |
| 46 | 46 | |
| 47 | 47 | [$corsSettings, $isLogEnabled] = $settingsProvider->get(C::class); |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * |
| 89 | - * @return iterable |
|
| 89 | + * @return \Generator |
|
| 90 | 90 | */ |
| 91 | 91 | private function getMessageDescriptionsFromProviders(): iterable |
| 92 | 92 | { |
@@ -59,10 +59,10 @@ |
||
| 59 | 59 | "Invalid Locales folder `$localesFolder`." |
| 60 | 60 | ); |
| 61 | 61 | |
| 62 | - $bundleEncoder = new FileBundleEncoder($this->getMessageDescriptionsFromProviders(), (string)$localesFolder); |
|
| 62 | + $bundleEncoder = new FileBundleEncoder($this->getMessageDescriptionsFromProviders(), (string) $localesFolder); |
|
| 63 | 63 | |
| 64 | 64 | return $defaults + [ |
| 65 | - static::KEY_LOCALES_DATA => $bundleEncoder->getStorageData((string)$defaultLocale), |
|
| 65 | + static::KEY_LOCALES_DATA => $bundleEncoder->getStorageData((string) $defaultLocale), |
|
| 66 | 66 | ]; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $serverOriginScheme = $appConfig[A::KEY_APP_ORIGIN_SCHEMA]; |
| 76 | 76 | $serverOriginHost = $appConfig[A::KEY_APP_ORIGIN_HOST]; |
| 77 | - $serverOriginPort = $appConfig[A::KEY_APP_ORIGIN_PORT] ? (int)$appConfig[A::KEY_APP_ORIGIN_PORT] : null; |
|
| 77 | + $serverOriginPort = $appConfig[A::KEY_APP_ORIGIN_PORT] ? (int) $appConfig[A::KEY_APP_ORIGIN_PORT] : null; |
|
| 78 | 78 | |
| 79 | 79 | $corsSettings = (new Settings())->init($serverOriginScheme, $serverOriginHost, $serverOriginPort); |
| 80 | 80 | |
@@ -91,17 +91,15 @@ discard block |
||
| 91 | 91 | $corsSettings->setCredentialsSupported() : $corsSettings->setCredentialsNotSupported(); |
| 92 | 92 | |
| 93 | 93 | $packageSettings[static::KEY_IS_FORCE_ADD_METHODS] === true ? |
| 94 | - $corsSettings->enableAddAllowedMethodsToPreFlightResponse() : |
|
| 95 | - $corsSettings->disableAddAllowedMethodsToPreFlightResponse(); |
|
| 94 | + $corsSettings->enableAddAllowedMethodsToPreFlightResponse() : $corsSettings->disableAddAllowedMethodsToPreFlightResponse(); |
|
| 96 | 95 | |
| 97 | 96 | $packageSettings[static::KEY_IS_FORCE_ADD_HEADERS] === true ? |
| 98 | - $corsSettings->enableAddAllowedHeadersToPreFlightResponse() : |
|
| 99 | - $corsSettings->disableAddAllowedHeadersToPreFlightResponse(); |
|
| 97 | + $corsSettings->enableAddAllowedHeadersToPreFlightResponse() : $corsSettings->disableAddAllowedHeadersToPreFlightResponse(); |
|
| 100 | 98 | |
| 101 | 99 | $packageSettings[static::KEY_IS_CHECK_HOST] === true ? |
| 102 | 100 | $corsSettings->enableCheckHost() : $corsSettings->disableCheckHost(); |
| 103 | 101 | |
| 104 | - return [$corsSettings->getData(), (bool)$packageSettings[static::KEY_LOG_IS_ENABLED]]; |
|
| 102 | + return [$corsSettings->getData(), (bool) $packageSettings[static::KEY_LOG_IS_ENABLED]]; |
|
| 105 | 103 | } |
| 106 | 104 | |
| 107 | 105 | /** |
@@ -112,7 +110,7 @@ discard block |
||
| 112 | 110 | $appConfig = $this->getAppConfig(); |
| 113 | 111 | |
| 114 | 112 | $serverOrigin = $appConfig[A::KEY_APP_ORIGIN_URI] ?? null; |
| 115 | - $isLogEnabled = (bool)($appConfig[A::KEY_IS_LOG_ENABLED] ?? false); |
|
| 113 | + $isLogEnabled = (bool) ($appConfig[A::KEY_IS_LOG_ENABLED] ?? false); |
|
| 116 | 114 | |
| 117 | 115 | return [ |
| 118 | 116 | static::KEY_ALLOWED_ORIGINS => empty($serverOrigin) === true ? [] : [$serverOrigin], |