@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function isPossible(): bool |
16 | 16 | { |
17 | - if (str_starts_with($this->value, '*string')){ |
|
17 | + if (str_starts_with($this->value, '*string')) { |
|
18 | 18 | $this->value = preg_replace('/^(\*string\s*)/', '', $this->value); |
19 | 19 | return true; |
20 | 20 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | { |
7 | 7 | public function isPossible(): bool; |
8 | 8 | |
9 | - public function getCastedValue(): string|bool|int|float|null; |
|
9 | + public function getCastedValue(): string | bool | int | float | null; |
|
10 | 10 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | public function isPossible(): bool |
17 | 17 | { |
18 | - if (str_starts_with($this->value, '*true')){ |
|
18 | + if (str_starts_with($this->value, '*true')) { |
|
19 | 19 | return true; |
20 | 20 | } |
21 | 21 | return strtolower($this->value) === 'true'; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | public function isPossible(): bool |
17 | 17 | { |
18 | - if (str_starts_with($this->value, '*false')){ |
|
18 | + if (str_starts_with($this->value, '*false')) { |
|
19 | 19 | return true; |
20 | 20 | } |
21 | 21 | return strtolower($this->value) === 'false'; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function isPossible(): bool |
16 | 16 | { |
17 | - if (str_starts_with($this->value, '*bool')){ |
|
17 | + if (str_starts_with($this->value, '*bool')) { |
|
18 | 18 | $this->value = preg_replace('/^(\*bool\s*)/', '', $this->value); |
19 | 19 | return true; |
20 | 20 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | final class Helper |
10 | 10 | { |
11 | - public static function scalarValueToString(string|bool|int|float|null $value): string |
|
11 | + public static function scalarValueToString(string | bool | int | float | null $value): string |
|
12 | 12 | { |
13 | 13 | if (gettype($value) === 'boolean') { |
14 | 14 | return $value ? 'true' : 'false'; |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | return (string)$value; |
17 | 17 | } |
18 | 18 | |
19 | - public static function castType(string|bool|int|float|null $value): string|bool|int|float|null |
|
19 | + public static function castType(string | bool | int | float | null $value): string | bool | int | float | null |
|
20 | 20 | { |
21 | 21 | if (gettype($value) !== 'string') { |
22 | 22 | return $value; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function loadEnv(bool $usePutEnv = false): void |
50 | 50 | { |
51 | - if ($usePutEnv){ |
|
51 | + if ($usePutEnv) { |
|
52 | 52 | $this->flags = $this->flags | self::POPULATE_PUTENV; |
53 | 53 | } |
54 | 54 | |
@@ -88,12 +88,12 @@ discard block |
||
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
91 | - public function handleValue(string $key, ?string $value): float|bool|int|string|null |
|
91 | + public function handleValue(string $key, ?string $value): float | bool | int | string | null |
|
92 | 92 | { |
93 | 93 | |
94 | 94 | if ($value !== null) { |
95 | 95 | $quoted = 0; |
96 | - $value = preg_replace_callback('/^(?<quote>[\'"])?(?<value>.*)\1/', function ($matches) { |
|
96 | + $value = preg_replace_callback('/^(?<quote>[\'"])?(?<value>.*)\1/', function($matches) { |
|
97 | 97 | return match ($matches['quote']) { |
98 | 98 | "'" => $matches['value'], |
99 | 99 | "\"" => strtr($matches['value'], self::CHARACTER_MAP) |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | public function populate( |
116 | 116 | string $key, |
117 | - string|null $value, |
|
117 | + string | null $value, |
|
118 | 118 | ): void { |
119 | 119 | $value = $this->handleValue($key, $value); |
120 | 120 |