@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @throws RuntimeException If $array is not accessible |
| 72 | 72 | */ |
| 73 | - public static function get(array | ArrayAccess $array, int|string $key, mixed $default = null): mixed |
|
| 73 | + public static function get(array | ArrayAccess $array, int | string $key, mixed $default = null): mixed |
|
| 74 | 74 | { |
| 75 | 75 | if (Arrays::keyExists($array, $key)) { |
| 76 | 76 | return $array[$key]; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | * @param array<mixed>|ArrayAccess<mixed, mixed> $array Array to check |
| 189 | 189 | * @param int|string $key Key to check |
| 190 | 190 | */ |
| 191 | - public static function keyExists(array | ArrayAccess $array, int|string $key): bool |
|
| 191 | + public static function keyExists(array | ArrayAccess $array, int | string $key): bool |
|
| 192 | 192 | { |
| 193 | 193 | if ($array instanceof ArrayAccess) { |
| 194 | 194 | return $array->offsetExists($key); |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * |
| 238 | 238 | * @throws RuntimeException If $array is not accessible |
| 239 | 239 | */ |
| 240 | - public static function set(array | ArrayAccess &$array, null|int|string $key, mixed $value): void |
|
| 240 | + public static function set(array | ArrayAccess & $array, null | int | string $key, mixed $value): void |
|
| 241 | 241 | { |
| 242 | 242 | if ($key === null) { |
| 243 | 243 | $array = $value; |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | * @param array<mixed> $array Array to check |
| 253 | 253 | * @param int|string $value Value to check |
| 254 | 254 | */ |
| 255 | - public static function valueExists(array $array, int|string $value): bool |
|
| 255 | + public static function valueExists(array $array, int | string $value): bool |
|
| 256 | 256 | { |
| 257 | 257 | return \in_array($value, $array, true); |
| 258 | 258 | } |