]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Cache/Cache.php
wrapping up 2019.12
[friendica.git] / src / Core / Cache / Cache.php
index b40c129ae7fe20ba5716f3ba2de4513e5b02d550..cf5b15d052afb877b36ac0b3a47c38abcc2ac3e2 100644 (file)
@@ -84,19 +84,19 @@ abstract class Cache implements ICache
         * Filters the keys of an array with a given prefix
         * Returns the filtered keys as an new array
         *
-        * @param array $array The array, which should get filtered
+        * @param array $keys The keys, which should get filtered
         * @param string|null $prefix The prefix (if null, all keys will get returned)
         *
         * @return array The filtered array with just the keys
         */
-       protected function filterArrayKeysByPrefix($array, $prefix = null)
+       protected function filterArrayKeysByPrefix(array $keys, string $prefix = null)
        {
                if (empty($prefix)) {
-                       return array_keys($array);
+                       return $keys;
                } else {
                        $result = [];
 
-                       foreach (array_keys($array) as $key) {
+                       foreach ($keys as $key) {
                                if (strpos($key, $prefix) === 0) {
                                        array_push($result, $key);
                                }