@@ -334,7 +334,7 @@ |
||
334 | 334 | * |
335 | 335 | * @param string $id The id of the cache entry to fetch. |
336 | 336 | * |
337 | - * @return mixed|false The cached data or FALSE, if no cache entry exists for the given id. |
|
337 | + * @return string The cached data or FALSE, if no cache entry exists for the given id. |
|
338 | 338 | */ |
339 | 339 | abstract protected function doFetch($id); |
340 | 340 |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | { |
121 | 121 | $tagStoredKeys = $this->fetch(self::TAG_PREFIX.$tag); |
122 | 122 | |
123 | - if (!is_array($tagStoredKeys)) { |
|
123 | + if ( ! is_array($tagStoredKeys)) { |
|
124 | 124 | $tagStoredKeys = []; |
125 | 125 | } |
126 | 126 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function save($id, $data, $lifeTime = 0, array $tags = []) |
164 | 164 | { |
165 | - if (!empty($tags)) { |
|
165 | + if ( ! empty($tags)) { |
|
166 | 166 | $this->updateTagsReferences($id, $tags); |
167 | 167 | |
168 | 168 | $this->doSave($this->getNamespacedId($id.self::TAG_SUFFIX), $tags, $lifeTime); |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | $tagStoredKeys = $this->fetch($tagKey); |
192 | 192 | |
193 | - if (!is_array($tagStoredKeys)) { |
|
193 | + if ( ! is_array($tagStoredKeys)) { |
|
194 | 194 | $tagStoredKeys = []; |
195 | 195 | } |
196 | 196 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | */ |
254 | 254 | private function getNamespacedId($id) |
255 | 255 | { |
256 | - $namespaceVersion = $this->getNamespaceVersion(); |
|
256 | + $namespaceVersion = $this->getNamespaceVersion(); |
|
257 | 257 | |
258 | 258 | return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion); |
259 | 259 | } |
@@ -317,11 +317,11 @@ discard block |
||
317 | 317 | |
318 | 318 | $tagStoredKeys = $this->fetch($tagKey); |
319 | 319 | |
320 | - if (!is_array($tagStoredKeys)) { |
|
320 | + if ( ! is_array($tagStoredKeys)) { |
|
321 | 321 | $tagStoredKeys = []; |
322 | 322 | } |
323 | 323 | |
324 | - if (!isset($tagStoredKeys[$id])) { |
|
324 | + if ( ! isset($tagStoredKeys[$id])) { |
|
325 | 325 | $tagStoredKeys[$id] = 1; |
326 | 326 | } |
327 | 327 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | $success = true; |
362 | 362 | |
363 | 363 | foreach ($keysAndValues as $key => $value) { |
364 | - if (!$this->doSave($key, $value, $lifetime)) { |
|
364 | + if ( ! $this->doSave($key, $value, $lifetime)) { |
|
365 | 365 | $success = false; |
366 | 366 | } |
367 | 367 | } |
@@ -40,7 +40,6 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Fetches an entry by tag from the cache. |
42 | 42 | * |
43 | - * @param string $id The id of the cache entry to fetch. |
|
44 | 43 | * |
45 | 44 | * @return mixed The cached data or FALSE, if no cache entry exists for the given id. |
46 | 45 | */ |
@@ -59,7 +58,8 @@ discard block |
||
59 | 58 | /** |
60 | 59 | * Deletes a cache entries marked by tags. |
61 | 60 | * |
62 | - * @param array $tag The tag id's. |
|
61 | + * @param array $tags The tag id's. |
|
62 | + * @return void |
|
63 | 63 | */ |
64 | 64 | public function deleteByTags(array $tags = []); |
65 | 65 | } |