@@ -28,14 +28,14 @@ |
||
| 28 | 28 | $configClasses = []; |
| 29 | 29 | foreach ($this->getPluginClassResolvers() as $resolver) { |
| 30 | 30 | $configClass = $resolver->resolve($pluginClass); |
| 31 | - if(!class_exists($configClass)) { |
|
| 31 | + if (!class_exists($configClass)) { |
|
| 32 | 32 | continue; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | $configClasses[] = $configClass; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - if(count($configClasses) > 1) { |
|
| 38 | + if (count($configClasses) > 1) { |
|
| 39 | 39 | throw new \RuntimeException( |
| 40 | 40 | sprintf( |
| 41 | 41 | 'Too many configuration classes for Application plugin "%s". [%s]', |
@@ -20,11 +20,11 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | protected function explodeStringToArray(string|array $list, string $separator = ','): array |
| 22 | 22 | { |
| 23 | - if(is_array($list)) { |
|
| 23 | + if (is_array($list)) { |
|
| 24 | 24 | return $list; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - if($separator === '') { |
|
| 27 | + if ($separator === '') { |
|
| 28 | 28 | return [$list]; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -22,13 +22,13 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | public function get(string $key, $default = null, bool $nullable = true): mixed |
| 24 | 24 | { |
| 25 | - if(is_bool($default)) { |
|
| 25 | + if (is_bool($default)) { |
|
| 26 | 26 | return $this->getBooleanValue($key, $default); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | $value = $this->getValue($key, $default); |
| 30 | 30 | |
| 31 | - if($nullable === false && !$value && !is_numeric($value)) { |
|
| 31 | + if ($nullable === false && !$value && !is_numeric($value)) { |
|
| 32 | 32 | throw new InvalidConfigurationException(sprintf('Configuration key "%s" can not be NULL', $key)); |
| 33 | 33 | } |
| 34 | 34 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | protected function getBooleanValue(string $key, bool $default): bool |
| 45 | 45 | { |
| 46 | 46 | $value = $this->getValue($key, $default); |
| 47 | - if($value === null) { |
|
| 47 | + if ($value === null) { |
|
| 48 | 48 | return $default; |
| 49 | 49 | } |
| 50 | 50 | |
@@ -22,11 +22,11 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | $applicationConfig = $config; |
| 24 | 24 | |
| 25 | - if(is_array($config)) { |
|
| 25 | + if (is_array($config)) { |
|
| 26 | 26 | $applicationConfig = (new DefaultApplicationConfigurationFactory($config)); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - if(($applicationConfig instanceof ApplicationConfigurationFactoryInterface)) { |
|
| 29 | + if (($applicationConfig instanceof ApplicationConfigurationFactoryInterface)) { |
|
| 30 | 30 | $applicationConfig = $applicationConfig->create(); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function boot(object $applicationPlugin): void |
| 40 | 40 | { |
| 41 | - if(!($applicationPlugin instanceof ConfigurableInterface)) { |
|
| 41 | + if (!($applicationPlugin instanceof ConfigurableInterface)) { |
|
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | |