@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * @param \Psr\Cache\CacheItemInterface $item |
| 58 | - * @return mixed |
|
| 58 | + * @return boolean|null |
|
| 59 | 59 | * @throws \InvalidArgumentException |
| 60 | 60 | */ |
| 61 | 61 | public function driverWrite(CacheItemInterface $item) |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | /** |
| 212 | 212 | * @param string $optionName |
| 213 | 213 | * @param mixed $optionValue |
| 214 | - * @return bool |
|
| 214 | + * @return boolean|null |
|
| 215 | 215 | * @throws \InvalidArgumentException |
| 216 | 216 | */ |
| 217 | 217 | public static function isValidOption($optionName, $optionValue) |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | } |
| 240 | 240 | } |
| 241 | 241 | /** |
| 242 | - * @return array |
|
| 242 | + * @return string[] |
|
| 243 | 243 | */ |
| 244 | 244 | public static function getValidOptions() |
| 245 | 245 | { |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | /** |
| 250 | - * @return array |
|
| 250 | + * @return string[] |
|
| 251 | 251 | */ |
| 252 | 252 | public static function getRequiredOptions() |
| 253 | 253 | { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | /* |
| 72 | 72 | * Skip if Existing Caching in Options |
| 73 | 73 | */ |
| 74 | - if (isset($option[ 'skipExisting' ]) && $option[ 'skipExisting' ] == true && file_exists($file_path)) { |
|
| 74 | + if (isset($option['skipExisting']) && $option['skipExisting'] == true && file_exists($file_path)) { |
|
| 75 | 75 | $content = $this->readfile($file_path); |
| 76 | 76 | $old = $this->decode($content); |
| 77 | 77 | $toWrite = false; |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | public static function isValidOption($optionName, $optionValue) |
| 218 | 218 | { |
| 219 | 219 | parent::isValidOption($optionName, $optionValue); |
| 220 | - switch($optionName) |
|
| 220 | + switch ($optionName) |
|
| 221 | 221 | { |
| 222 | 222 | case 'path': |
| 223 | 223 | return is_string($optionValue); |
@@ -294,11 +294,11 @@ discard block |
||
| 294 | 294 | if (strpos($subdirFile, '.') === false) { |
| 295 | 295 | $key = $subdirFile; |
| 296 | 296 | } else { |
| 297 | - $key = explode('.', $subdirFile)[ 0 ]; |
|
| 297 | + $key = explode('.', $subdirFile)[0]; |
|
| 298 | 298 | } |
| 299 | - $content[ $key ] = [ |
|
| 299 | + $content[$key] = [ |
|
| 300 | 300 | 'size' => $size, |
| 301 | - 'write_time' => (isset($object[ 'write_time' ]) ? $object[ 'write_time' ] : null), |
|
| 301 | + 'write_time' => (isset($object['write_time']) ? $object['write_time'] : null), |
|
| 302 | 302 | ]; |
| 303 | 303 | if ($object->isExpired()) { |
| 304 | 304 | @unlink($file_path); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if (is_array($config_name)) { |
| 66 | 66 | $this->config = array_merge($this->config, $config_name); |
| 67 | 67 | } else { |
| 68 | - $this->config[ $config_name ] = $value; |
|
| 68 | + $this->config[$config_name] = $value; |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | public function driverUnwrapData(array $wrapper) |
| 184 | 184 | { |
| 185 | - return $wrapper[ self::DRIVER_DATA_WRAPPER_INDEX ]; |
|
| 185 | + return $wrapper[self::DRIVER_DATA_WRAPPER_INDEX]; |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /** |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | */ |
| 192 | 192 | public function driverUnwrapTags(array $wrapper) |
| 193 | 193 | { |
| 194 | - return $wrapper[ self::DRIVER_TAGS_WRAPPER_INDEX ]; |
|
| 194 | + return $wrapper[self::DRIVER_TAGS_WRAPPER_INDEX]; |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | public function driverUnwrapTime(array $wrapper) |
| 203 | 203 | { |
| 204 | - return $wrapper[ self::DRIVER_TIME_WRAPPER_INDEX ]; |
|
| 204 | + return $wrapper[self::DRIVER_TIME_WRAPPER_INDEX]; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | foreach ($tagsItems as $tagsItem) { |
| 256 | 256 | $data = (array) $tagsItem->get(); |
| 257 | 257 | |
| 258 | - unset($data[ $item->getKey() ]); |
|
| 258 | + unset($data[$item->getKey()]); |
|
| 259 | 259 | $tagsItem->set($data); |
| 260 | 260 | |
| 261 | 261 | /** |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | */ |
| 307 | 307 | public static function isValidOption($optionName, $optionValue) |
| 308 | 308 | { |
| 309 | - if(!is_string($optionName)) |
|
| 309 | + if (!is_string($optionName)) |
|
| 310 | 310 | { |
| 311 | 311 | throw new \InvalidArgumentException('$optionName must be a string'); |
| 312 | 312 | } |