@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | protected function parseString(string $input) |
24 | 24 | { |
25 | 25 | try { |
26 | - return Symfony\Yaml::parse($input, (int)$this->getOption('flags', 0)); |
|
26 | + return Symfony\Yaml::parse($input, (int) $this->getOption('flags', 0)); |
|
27 | 27 | } catch (Symfony\Exception\ParseException $e) { |
28 | 28 | $this->logger->error($e->getMessage()); |
29 | 29 | return null; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | protected function parseFile(string $filename) |
40 | 40 | { |
41 | 41 | try { |
42 | - return Symfony\Yaml::parseFile($filename, (int)$this->getOption('flags', 0)); |
|
42 | + return Symfony\Yaml::parseFile($filename, (int) $this->getOption('flags', 0)); |
|
43 | 43 | } catch (Symfony\Exception\ParseException $e) { |
44 | 44 | $this->logger->error($e->getMessage()); |
45 | 45 | return null; |
@@ -23,8 +23,8 @@ |
||
23 | 23 | $result = \json_decode( |
24 | 24 | $input, |
25 | 25 | true, |
26 | - (int)$this->getOption('depth', 512), |
|
27 | - (int)$this->getOption('options', 0) |
|
26 | + (int) $this->getOption('depth', 512), |
|
27 | + (int) $this->getOption('options', 0) |
|
28 | 28 | ); |
29 | 29 | |
30 | 30 | //Clear the most recent error |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function addConfig($params, array $options = [], string $parseClass = self::INI, bool $replace = true): void |
45 | 45 | { |
46 | - $params = (array)$params; |
|
46 | + $params = (array) $params; |
|
47 | 47 | |
48 | 48 | if (!class_exists($parseClass)) { |
49 | 49 | throw new \Exception(sprintf('Not found parse class: %s', $parseClass)); |
@@ -95,13 +95,13 @@ discard block |
||
95 | 95 | } |
96 | 96 | if ($replace === true) { |
97 | 97 | $this->config[$namespace] = \array_merge_recursive_distinct( |
98 | - (array)$this->config[$namespace], |
|
98 | + (array) $this->config[$namespace], |
|
99 | 99 | $result |
100 | 100 | ); |
101 | 101 | } else { |
102 | 102 | $this->config[$namespace] = \array_merge_recursive_distinct( |
103 | 103 | $result, |
104 | - (array)$this->config[$namespace] |
|
104 | + (array) $this->config[$namespace] |
|
105 | 105 | ); |
106 | 106 | } |
107 | 107 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | private function getValue(array $parts, $array) |
151 | 151 | { |
152 | - if (!is_array($array)){ |
|
152 | + if (!is_array($array)) { |
|
153 | 153 | throw new Exception(); |
154 | 154 | } |
155 | 155 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | if (count($parts) > 0) { |
163 | 163 | $returnValue = $this->getValue($parts, $array[$key]); |
164 | 164 | /** @var class-string<ValueHandlerInterface> $valueHandler */ |
165 | - foreach ($this->valueHandlers as $valueHandler){ |
|
165 | + foreach ($this->valueHandlers as $valueHandler) { |
|
166 | 166 | $returnValue = (new $valueHandler())->handle($returnValue); |
167 | 167 | } |
168 | 168 | return $returnValue; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | if (is_array($value) || is_string($value)) { |
21 | 21 | return preg_replace_callback( |
22 | 22 | '/(%)([A-Z_]+)(%)/', |
23 | - function ($matches) { |
|
23 | + function($matches) { |
|
24 | 24 | return |
25 | 25 | $_ENV[$matches[2]] |
26 | 26 | ?? $_SERVER[$matches[2]] |