@@ -14,12 +14,12 @@ |
||
14 | 14 | */ |
15 | 15 | private array $collection = []; |
16 | 16 | |
17 | - public function add(string $key, string|bool|int|float|null $value): void |
|
17 | + public function add(string $key, string | bool | int | float | null $value): void |
|
18 | 18 | { |
19 | 19 | $this->collection[$key] = $value; |
20 | 20 | } |
21 | 21 | |
22 | - public function get(string $key, float|bool|int|string|null $default = null): float|bool|int|string|null |
|
22 | + public function get(string $key, float | bool | int | string | null $default = null): float | bool | int | string | null |
|
23 | 23 | { |
24 | 24 | return $this->has($key) ? $this->collection[$key] : $default; |
25 | 25 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $envArray = []; |
28 | 28 | /** @var LineInterface $line */ |
29 | 29 | foreach ($this->parseLines($content) as $line) { |
30 | - if ($line instanceof EnvLine){ |
|
30 | + if ($line instanceof EnvLine) { |
|
31 | 31 | $envArray[$line->getKey()->getValue()] = $line->getValue()?->getValue(); |
32 | 32 | } |
33 | 33 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $structure = []; |
44 | 44 | /** @var LineInterface $line */ |
45 | 45 | foreach ($this->parseLines($content) as $line) { |
46 | - if ($line instanceof EnvLine){ |
|
46 | + if ($line instanceof EnvLine) { |
|
47 | 47 | $structure[$line->getKey()->getValue()] = $line; |
48 | 48 | continue; |
49 | 49 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | private array $paths = []; |
19 | 19 | |
20 | - public function getPath(): string|false |
|
20 | + public function getPath(): string | false |
|
21 | 21 | { |
22 | 22 | $key = key($this->paths); |
23 | 23 | if ($key === null) { |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | interface StorageInterface |
6 | 6 | { |
7 | - public function getPath(): string|false; |
|
7 | + public function getPath(): string | false; |
|
8 | 8 | |
9 | 9 | public function isLoaded(string $path): bool; |
10 | 10 |
@@ -14,14 +14,14 @@ |
||
14 | 14 | |
15 | 15 | public function isPossible(): bool |
16 | 16 | { |
17 | - if (str_starts_with($this->value, '*int16')){ |
|
17 | + if (str_starts_with($this->value, '*int16')) { |
|
18 | 18 | $this->value = preg_replace('/^(\*int16\s*)/', '', $this->value); |
19 | 19 | return true; |
20 | 20 | } |
21 | 21 | return false; |
22 | 22 | } |
23 | 23 | |
24 | - public function getCastedValue(): int|float |
|
24 | + public function getCastedValue(): int | float |
|
25 | 25 | { |
26 | 26 | return hexdec($this->value); |
27 | 27 | } |
@@ -24,6 +24,6 @@ |
||
24 | 24 | |
25 | 25 | public function getCastedValue(): int |
26 | 26 | { |
27 | - return (int) $this->value; |
|
27 | + return (int)$this->value; |
|
28 | 28 | } |
29 | 29 | } |
@@ -15,13 +15,13 @@ |
||
15 | 15 | |
16 | 16 | public function isPossible(): bool |
17 | 17 | { |
18 | - if (str_starts_with($this->value, '*null')){ |
|
18 | + if (str_starts_with($this->value, '*null')) { |
|
19 | 19 | return true; |
20 | 20 | } |
21 | 21 | return false; |
22 | 22 | } |
23 | 23 | |
24 | - public function getCastedValue(): string|null |
|
24 | + public function getCastedValue(): string | null |
|
25 | 25 | { |
26 | 26 | return null; |
27 | 27 | } |
@@ -14,14 +14,14 @@ |
||
14 | 14 | |
15 | 15 | public function isPossible(): bool |
16 | 16 | { |
17 | - if (str_starts_with($this->value, '*int8')){ |
|
17 | + if (str_starts_with($this->value, '*int8')) { |
|
18 | 18 | $this->value = preg_replace('/^(\*int8\s*)/', '', $this->value); |
19 | 19 | return true; |
20 | 20 | } |
21 | 21 | return false; |
22 | 22 | } |
23 | 23 | |
24 | - public function getCastedValue(): int|float |
|
24 | + public function getCastedValue(): int | float |
|
25 | 25 | { |
26 | 26 | return octdec($this->value); |
27 | 27 | } |
@@ -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 | } |