Skip to content

Commit

Permalink
returns status code
Browse files Browse the repository at this point in the history
  • Loading branch information
mirko-pagliai committed Mar 30, 2016
1 parent a8c2d05 commit 46c76a9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Cache/Cache.php
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 46c76a9

Please sign in to comment.