From 6567f10e696e90434af82c947b622d4b5dad1c56 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Wed, 5 Aug 2020 16:20:08 +0000 Subject: [PATCH] [UTIL] Fix and rename arrayRemoveKeys --- src/Util/Common.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Util/Common.php b/src/Util/Common.php index f34ed16101..43fa697917 100644 --- a/src/Util/Common.php +++ b/src/Util/Common.php @@ -1,6 +1,7 @@ . + // }}} /** @@ -104,15 +106,15 @@ abstract class Common // $paths[basename(common_config($cat, 'path'))] = true; // } - // return in_array($str, array_keys($paths)); + // return in_arry($str, array_keys($paths)); } /** * Remove keys from the _values_ of $keys from the array $from */ - public static function array_remove_keys(array $from, array $keys, bool $strict = false) + public static function arrayRemoveKeys(array $from, array $keys, bool $strict = false) { - return F\filter($from, function ($e) use ($keys, $strict) { return in_array($e, $keys, $strict); }); + return F\filter($from, function ($_, $key) use ($keys, $strict) { return !in_array($key, $keys, $strict); }); } /**