X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FCache%2FCache.php;h=cf5b15d052afb877b36ac0b3a47c38abcc2ac3e2;hb=cbe435bb708ccf17a4b5bea1e20c3258c9524700;hp=4e24246e886e584f4c2d24b16b1c5aea2a5012ad;hpb=19777baa793f51e744adb8e3fc12bb857bd111e3;p=friendica.git diff --git a/src/Core/Cache/Cache.php b/src/Core/Cache/Cache.php index 4e24246e88..cf5b15d052 100644 --- a/src/Core/Cache/Cache.php +++ b/src/Core/Cache/Cache.php @@ -28,13 +28,6 @@ abstract class Cache implements ICache const MINUTE = 60; const INFINITE = 0; - /** - * Force each Cache implementation to define the ToString method - * - * @return string - */ - abstract function __toString(); - /** * @var string The hostname */ @@ -91,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); }