diff --git a/src/CacheManager.php b/src/CacheManager.php index f7190842..88428353 100644 --- a/src/CacheManager.php +++ b/src/CacheManager.php @@ -20,8 +20,10 @@ class CacheManager extends BaseCacheManager $tags = [config('tenancy.cache.tag_base') . tenant()->getTenantKey()]; if ($method === 'tags') { - if (count($parameters) !== 1) { - throw new \Exception("Method tags() takes exactly 1 argument. {count($parameters)} passed."); + $count = count($parameters); + + if ($count !== 1) { + throw new \Exception("Method tags() takes exactly 1 argument. $count passed."); } $names = $parameters[0];