@@ -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 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function addConfig($params, array $options = [], string $parseClass = self::INI, bool $replace = true): void |
44 | 44 | { |
45 | - $params = (array)$params; |
|
45 | + $params = (array) $params; |
|
46 | 46 | |
47 | 47 | if (!class_exists($parseClass)) { |
48 | 48 | throw new \Exception(sprintf('Not found parse class: %s', $parseClass)); |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | } |
95 | 95 | if ($replace === true) { |
96 | 96 | $this->config[$namespace] = \array_merge_recursive_distinct( |
97 | - (array)$this->config[$namespace], |
|
97 | + (array) $this->config[$namespace], |
|
98 | 98 | $result |
99 | 99 | ); |
100 | 100 | } else { |
101 | 101 | $this->config[$namespace] = \array_merge_recursive_distinct( |
102 | 102 | $result, |
103 | - (array)$this->config[$namespace] |
|
103 | + (array) $this->config[$namespace] |
|
104 | 104 | ); |
105 | 105 | } |
106 | 106 | } |
@@ -11,7 +11,6 @@ |
||
11 | 11 | final class EnvValueHandler implements ValueHandlerInterface |
12 | 12 | { |
13 | 13 | /** |
14 | - |
|
15 | 14 | * @psalm-suppress InvalidArrayOffset, MixedArgumentTypeCoercion |
16 | 15 | */ |
17 | 16 | public function handle(string $input): string |
@@ -19,11 +19,11 @@ |
||
19 | 19 | |
20 | 20 | return preg_replace_callback( |
21 | 21 | '/(%)([A-Z_]+)(%)/', |
22 | - function (array $matches) { |
|
22 | + function(array $matches) { |
|
23 | 23 | return |
24 | 24 | $_ENV[$matches[2]] |
25 | 25 | ?? $_SERVER[$matches[2]] |
26 | - ?? (getenv($matches[2]) === false ? $matches[1] . $matches[2] . $matches[3] : getenv($matches[2])); |
|
26 | + ?? (getenv($matches[2]) === false ? $matches[1].$matches[2].$matches[3] : getenv($matches[2])); |
|
27 | 27 | }, |
28 | 28 | $input |
29 | 29 | ) ?? ''; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | public function parse() |
86 | 86 | { |
87 | 87 | if (is_null($this->configSource)) { |
88 | - if ($this->logger instanceof LoggerInterface){ |
|
88 | + if ($this->logger instanceof LoggerInterface) { |
|
89 | 89 | $this->logger->notice('Add data for parsing'); |
90 | 90 | } |
91 | 91 | return null; |
@@ -22,7 +22,7 @@ |
||
22 | 22 | protected function parseString(string $input) |
23 | 23 | { |
24 | 24 | try { |
25 | - return Symfony\Yaml::parse($input, (int)$this->getOption('flags', 0)); |
|
25 | + return Symfony\Yaml::parse($input, (int) $this->getOption('flags', 0)); |
|
26 | 26 | } catch (Symfony\Exception\ParseException $e) { |
27 | 27 | if ($this->logger instanceof LoggerInterface) { |
28 | 28 | $this->logger->error($e->getMessage()); |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | return preg_replace_callback( |
20 | 20 | '/(%)(.+)(%)/', |
21 | - function ($matches) { |
|
21 | + function($matches) { |
|
22 | 22 | if (\defined($matches[2])) { |
23 | 23 | return constant($matches[2]); |
24 | 24 | } |
25 | - return $matches[1] . $matches[2] . $matches[3]; |
|
25 | + return $matches[1].$matches[2].$matches[3]; |
|
26 | 26 | }, |
27 | 27 | $input |
28 | 28 | ) ?? ''; |