Upgrade to 3.6.0

This commit is contained in:
Bastian Allgeier
2021-11-16 14:53:37 +01:00
parent 7388fa4d24
commit 92b7a330fa
318 changed files with 20017 additions and 6878 deletions

View File

@@ -374,6 +374,20 @@ class A
return $array;
}
/**
* A simple wrapper around array_map
* with a sane argument order
* @since 3.6.0
*
* @param array $array
* @param callable $map
* @return array
*/
public static function map(array $array, callable $map): array
{
return array_map($map, $array);
}
/**
* Move an array item to a new index
*
@@ -418,7 +432,7 @@ class A
*
* $required = ['cat', 'elephant'];
*
* $missng = A::missing($array, $required);
* $missing = A::missing($array, $required);
* // missing: [
* // 'elephant'
* // ];
@@ -599,7 +613,7 @@ class A
}
/**
* Checks wether an array is associative or not
* Checks whether an array is associative or not
*
* <code>
* $array = ['a', 'b', 'c'];