@@ -27,7 +27,7 @@ |
||
| 27 | 27 | /** |
| 28 | 28 | * __construct |
| 29 | 29 | * |
| 30 | - * @param \Memcache $memcache |
|
| 30 | + * @param \Memcache|null $memcache |
|
| 31 | 31 | */ |
| 32 | 32 | public function __construct($memcache) |
| 33 | 33 | { |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | /** |
| 23 | 23 | * __construct |
| 24 | 24 | * |
| 25 | - * @param \Memcached $memcached |
|
| 25 | + * @param \Memcached|null $memcached |
|
| 26 | 26 | */ |
| 27 | 27 | public function __construct($memcached) |
| 28 | 28 | { |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | private $client; |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * @param Client $client |
|
| 25 | + * @param Client|null $client |
|
| 26 | 26 | */ |
| 27 | 27 | public function __construct($client) |
| 28 | 28 | { |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | /** |
| 397 | - * @return mixed |
|
| 397 | + * @return string |
|
| 398 | 398 | */ |
| 399 | 399 | public function getPrefix() |
| 400 | 400 | { |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | * @param mixed $value |
| 419 | 419 | * @param \DateTime $date |
| 420 | 420 | * |
| 421 | - * @return mixed|void |
|
| 421 | + * @return boolean |
|
| 422 | 422 | * @throws \Exception |
| 423 | 423 | */ |
| 424 | 424 | public function setItemToDate($key, $value, \DateTime $date) |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | protected function getTheDefaultPrefix() |
| 224 | 224 | { |
| 225 | - return (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '') . '_' . (isset($_SESSION['language']) ? $_SESSION['language'] : '') . '_' . (isset($_SESSION['language_extra']) ? $_SESSION['language_extra'] : ''); |
|
| 225 | + return (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '').'_'.(isset($_SESSION['language']) ? $_SESSION['language'] : '').'_'.(isset($_SESSION['language_extra']) ? $_SESSION['language_extra'] : ''); |
|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | */ |
| 400 | 400 | private function calculateStoreKey($rawKey) |
| 401 | 401 | { |
| 402 | - return $this->getPrefix() . $rawKey; |
|
| 402 | + return $this->getPrefix().$rawKey; |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | /** |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | /** |
| 6 | 6 | * SerializerIgbinary: serialize / unserialize |
| 7 | 7 | * |
| 8 | - |
|
| 9 | 8 | * @package voku\cache |
| 10 | 9 | */ |
| 11 | 10 | class SerializerIgbinary implements iSerializer |
@@ -151,6 +151,9 @@ discard block |
||
| 151 | 151 | return true; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | + /** |
|
| 155 | + * @param string $path |
|
| 156 | + */ |
|
| 154 | 157 | protected function createCacheDirectory($path) |
| 155 | 158 | { |
| 156 | 159 | if (!@mkdir($path, 0777, true) || !is_dir($path)) { |
@@ -165,7 +168,7 @@ discard block |
||
| 165 | 168 | } |
| 166 | 169 | |
| 167 | 170 | /** |
| 168 | - * @param $cacheFile |
|
| 171 | + * @param string $cacheFile |
|
| 169 | 172 | * |
| 170 | 173 | * @return bool |
| 171 | 174 | */ |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $this->serializer = new SerializerIgbinary(); |
| 36 | 36 | |
| 37 | 37 | if (!$cacheDir) { |
| 38 | - $cacheDir = realpath(sys_get_temp_dir()) . '/cache'; |
|
| 38 | + $cacheDir = realpath(sys_get_temp_dir()).'/cache'; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $this->cacheDir = (string)$cacheDir; |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | protected function getFileName($key) |
| 187 | 187 | { |
| 188 | - return $this->cacheDir . DIRECTORY_SEPARATOR . self::CACHE_FILE_PREFIX . $key . self::CACHE_FILE_SUBFIX; |
|
| 188 | + return $this->cacheDir.DIRECTORY_SEPARATOR.self::CACHE_FILE_PREFIX.$key.self::CACHE_FILE_SUBFIX; |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | /** |