You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Adapter/Chain/CachePoolChain.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ public function getItems(array $keys = []): iterable
118
118
$hits = [];
119
119
$loadedItems = [];
120
120
$notFoundItems = [];
121
-
$keysCount = count($keys);
121
+
$keysCount = \count($keys);
122
122
$poolResponded = false;
123
123
foreach ($this->getPools() as$poolKey => $pool) {
124
124
try {
@@ -154,7 +154,7 @@ public function getItems(array $keys = []): iterable
154
154
if ([] !== $poolNotFoundItems) {
155
155
$notFoundItems[$poolKey] = $poolNotFoundItems;
156
156
}
157
-
if (count($hits) === $keysCount) {
157
+
if (\count($hits) === $keysCount) {
158
158
break;
159
159
}
160
160
} catch (\Exception$e) {
@@ -199,14 +199,14 @@ private function prepareKeys(array $keys): array
199
199
{
200
200
$validatedKeys = [];
201
201
foreach ($keysas$key) {
202
-
if (!is_string($key)) {
203
-
thrownewInvalidArgumentException(sprintf('Cache key must be string, "%s" given', get_debug_type($key)));
202
+
if (!\is_string($key)) {
203
+
thrownewInvalidArgumentException(\sprintf('Cache key must be string, "%s" given', get_debug_type($key)));
204
204
}
205
205
if ('' === $key) {
206
206
thrownewInvalidArgumentException('Cache key cannot be an empty string');
207
207
}
208
208
if (preg_match('|[\{\}\(\)/\\\\\@\:]|', $key)) {
209
-
thrownewInvalidArgumentException(sprintf('Invalid key: "%s". The key contains one or more characters reserved for future extension: {}()/\@:', $key));
209
+
thrownewInvalidArgumentException(\sprintf('Invalid key: "%s". The key contains one or more characters reserved for future extension: {}()/\@:', $key));
0 commit comments