@@ -62,7 +62,7 @@ public static function key(mixed $key, array $array, bool $returnValue = false):
62
62
* Check is value exists in the array.
63
63
* @SuppressWarnings(PHPMD.ShortMethodName)
64
64
*/
65
- public static function in (mixed $ value , array $ array , bool $ returnKey = false ): string | int | bool |null
65
+ public static function in (mixed $ value , array $ array , bool $ returnKey = false ): null | bool |int | string
66
66
{
67
67
$ inArray = \in_array ($ value , $ array , true );
68
68
@@ -96,7 +96,7 @@ public static function last(array $array): mixed
96
96
/**
97
97
* Returns the first key in an array.
98
98
*/
99
- public static function firstKey (array $ array ): int |string | null
99
+ public static function firstKey (array $ array ): null | int |string
100
100
{
101
101
\reset ($ array );
102
102
@@ -106,7 +106,7 @@ public static function firstKey(array $array): int|string|null
106
106
/**
107
107
* Returns the last key in an array.
108
108
*/
109
- public static function lastKey (array $ array ): int |string | null
109
+ public static function lastKey (array $ array ): null | int |string
110
110
{
111
111
\end ($ array );
112
112
@@ -148,7 +148,7 @@ static function (mixed $value, int|string $key) use (&$flattened, $preserveKeys)
148
148
*/
149
149
public static function search (
150
150
array $ array ,
151
- null |bool |int | float |string $ search ,
151
+ null |bool |float | int |string $ search ,
152
152
?string $ field = null ,
153
153
): bool |string {
154
154
// *grumbles* stupid PHP type system
@@ -402,11 +402,11 @@ public static function implode(string $glue, array $array): string
402
402
/**
403
403
* Remove all items from array by value.
404
404
*/
405
- public static function removeByValue (array $ array , float |bool |int |string | null $ value ): array
405
+ public static function removeByValue (array $ array , null |bool |float | int |string $ value ): array
406
406
{
407
407
return \array_filter (
408
408
$ array ,
409
- static fn (float |bool |int |string | null $ arrayItem ): bool => $ value !== $ arrayItem ,
409
+ static fn (null |bool |float | int |string $ arrayItem ): bool => $ value !== $ arrayItem ,
410
410
\ARRAY_FILTER_USE_BOTH ,
411
411
);
412
412
}
0 commit comments