@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | { |
8 | 8 | protected array $elements = []; |
9 | 9 | |
10 | - public function get(string|int $index, $default = null): mixed |
|
10 | + public function get(string | int $index, $default = null): mixed |
|
11 | 11 | { |
12 | 12 | return $this->elements[$index] ?? $default; |
13 | 13 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | return true; |
43 | 43 | } |
44 | 44 | |
45 | - public function indexOf(mixed $element): bool|int|string |
|
45 | + public function indexOf(mixed $element): bool | int | string |
|
46 | 46 | { |
47 | 47 | return array_search($element, $this->elements, true); |
48 | 48 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | return $this; |
96 | 96 | } |
97 | 97 | |
98 | - public function forEach(callable $callback, bool $stopable = false): static |
|
98 | + public function forEach (callable $callback, bool $stopable = false): static |
|
99 | 99 | { |
100 | 100 | foreach ($this->elements as $index => $element) { |
101 | 101 | $result = call_user_func_array($callback, [$element, $index]); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
17 | - public function set(string|int $index, $value): self |
|
17 | + public function set(string | int $index, $value): self |
|
18 | 18 | { |
19 | 19 | $this->insert($value, $index); |
20 | 20 | return $this; |