@@ -28,16 +28,16 @@ |
||
28 | 28 | * @param DateInterval $ttl |
29 | 29 | * @throws CacheException |
30 | 30 | */ |
31 | - public function __construct(DateInterval $ttl) |
|
32 | - { |
|
33 | - $foundApc = \extension_loaded('apc'); |
|
31 | + public function __construct(DateInterval $ttl) |
|
32 | + { |
|
33 | + $foundApc = \extension_loaded('apc'); |
|
34 | 34 | |
35 | - if (!$foundApc){ |
|
36 | - throw new CacheException('APC Extension not found.'); |
|
37 | - } |
|
35 | + if (!$foundApc){ |
|
36 | + throw new CacheException('APC Extension not found.'); |
|
37 | + } |
|
38 | 38 | |
39 | - parent::__construct($ttl); |
|
40 | - } |
|
39 | + parent::__construct($ttl); |
|
40 | + } |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Determines whether an item is present in the cache. |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. |
25 | 25 | * |
26 | 26 | * @param string $key The key of the item to store. |
27 | - * @param mixed $value The value of the item to store, must be serializable. |
|
27 | + * @param string $value The value of the item to store, must be serializable. |
|
28 | 28 | * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and |
29 | 29 | * the driver supports TTL then the library may set a default value |
30 | 30 | * for it or let the driver take care of that. |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * Fetches a value from the cache. |
76 | 76 | * |
77 | 77 | * @param string $key The unique key of this item in the cache. |
78 | - * @param mixed $default Default value to return if the key does not exist. |
|
78 | + * @param string $default Default value to return if the key does not exist. |
|
79 | 79 | * |
80 | 80 | * @return mixed The value of the item from the cache, or $default in case of cache miss. |
81 | 81 | * |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | /** |
114 | 114 | * Obtains multiple cache items by their unique keys. |
115 | 115 | * |
116 | - * @param \iterable $keys A list of keys that can obtained in a single operation. |
|
116 | + * @param string[] $keys A list of keys that can obtained in a single operation. |
|
117 | 117 | * @param mixed $default Default value to return for keys that do not exist. |
118 | 118 | * |
119 | 119 | * @return \iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * Persists a set of key => value pairs in the cache, with an optional TTL. |
140 | 140 | * |
141 | 141 | * @param \iterable $values A list of key => value pairs for a multiple-set operation. |
142 | - * @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and |
|
142 | + * @param integer $ttl Optional. The TTL value of this item. If no value is sent and |
|
143 | 143 | * the driver supports TTL then the library may set a default value |
144 | 144 | * for it or let the driver take care of that. |
145 | 145 | * |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | /** |
169 | 169 | * Deletes multiple cache items in a single operation. |
170 | 170 | * |
171 | - * @param \iterable $keys A list of string-based keys to be deleted. |
|
171 | + * @param string[] $keys A list of string-based keys to be deleted. |
|
172 | 172 | * |
173 | 173 | * @return bool True if the items were successfully removed. False if there was an error. |
174 | 174 | * |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | /** |
206 | 206 | * Check that provided key is valid. |
207 | 207 | * |
208 | - * @param $key |
|
208 | + * @param string $key |
|
209 | 209 | * @throws InvalidArgumentException |
210 | 210 | */ |
211 | 211 | private function _isValidKey($key){ |
@@ -86,7 +86,7 @@ |
||
86 | 86 | * Test that clear is called. |
87 | 87 | */ |
88 | 88 | public function testClear(){ |
89 | - $this->assertEquals($this->cacheStorage->clear(), true); |
|
89 | + $this->assertEquals($this->cacheStorage->clear(), true); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -99,10 +99,10 @@ |
||
99 | 99 | * @return bool |
100 | 100 | */ |
101 | 101 | public function has($key){ |
102 | - if ($this->_fetchCacheFile($key)){ |
|
103 | - return true; |
|
104 | - } |
|
105 | - return false; |
|
102 | + if ($this->_fetchCacheFile($key)){ |
|
103 | + return true; |
|
104 | + } |
|
105 | + return false; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |