From 46c76a933ae3edaf19091b55710c4172d3414804 Mon Sep 17 00:00:00 2001 From: Mirko Pagliai Date: Wed, 30 Mar 2016 12:04:21 +0200 Subject: [PATCH] returns status code --- src/Cache/Cache.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Cache/Cache.php b/src/Cache/Cache.php index 9154d96418d..aad6a820933 100644 --- a/src/Cache/Cache.php +++ b/src/Cache/Cache.php @@ -450,19 +450,17 @@ public static function clear($check = false, $config = 'default') * Delete all keys from the cache from all configurations. * * @param bool $check if true will check expiration, otherwise delete all - * @return bool True if the cache of all configurations was successfully cleared, false otherwise + * @return array Status code. For each configuration, it reports the status of the operation */ public static function clearAll($check = false) { - $success = true; + $status = []; foreach (self::configured() as $config) { - if (!self::clear($check, $config)) { - $success = false; - } + $status[$config] = self::clear($check, $config); } - return $success; + return $status; } /**