rename arrayOnlyItems to arrayLimitKeys

This commit is contained in:
2023-03-13 11:25:13 +10:00
parent 46de5cc0c9
commit 8a3d9eec03

View File

@@ -34,7 +34,7 @@ function arrayRemoveItem(array $arr, string|array $item): array
* @param string|array $keys The keys to keep. * @param string|array $keys The keys to keep.
* @return array The filtered array. * @return array The filtered array.
*/ */
function arrayOnlyItems(array $arr, array $keys): array function arrayLimitKeys(array $arr, array $keys): array
{ {
return array_intersect_key($arr, array_flip($keys)); return array_intersect_key($arr, array_flip($keys));
} }