@@ -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 | { |
@@ -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 | /** |
@@ -210,7 +210,7 @@ |
||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | /** |
| 213 | - * @param $cacheFile |
|
| 213 | + * @param string $cacheFile |
|
| 214 | 214 | * |
| 215 | 215 | * @return bool |
| 216 | 216 | */ |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | /** |
| 408 | - * @param $str |
|
| 408 | + * @param string $str |
|
| 409 | 409 | * |
| 410 | 410 | * @return string |
| 411 | 411 | */ |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | /** |
| 440 | - * @return mixed |
|
| 440 | + * @return string |
|
| 441 | 441 | */ |
| 442 | 442 | public function getPrefix() |
| 443 | 443 | { |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | * @param mixed $value |
| 462 | 462 | * @param \DateTime $date |
| 463 | 463 | * |
| 464 | - * @return mixed|void |
|
| 464 | + * @return boolean |
|
| 465 | 465 | * @throws \Exception |
| 466 | 466 | */ |
| 467 | 467 | public function setItemToDate($key, $value, \DateTime $date) |
@@ -214,10 +214,10 @@ discard block |
||
| 214 | 214 | */ |
| 215 | 215 | protected function getTheDefaultPrefix() |
| 216 | 216 | { |
| 217 | - return (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '') . '_' . |
|
| 218 | - (isset($_SERVER['THEME']) ? $_SERVER['THEME'] : '') . '_' . |
|
| 219 | - (isset($_SERVER['STAGE']) ? $_SERVER['STAGE'] : '') . '_' . |
|
| 220 | - (isset($_SESSION['language']) ? $_SESSION['language'] : '') . '_' . |
|
| 217 | + return (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '').'_'. |
|
| 218 | + (isset($_SERVER['THEME']) ? $_SERVER['THEME'] : '').'_'. |
|
| 219 | + (isset($_SERVER['STAGE']) ? $_SERVER['STAGE'] : '').'_'. |
|
| 220 | + (isset($_SESSION['language']) ? $_SESSION['language'] : '').'_'. |
|
| 221 | 221 | (isset($_SESSION['language_extra']) ? $_SESSION['language_extra'] : ''); |
| 222 | 222 | } |
| 223 | 223 | |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | */ |
| 396 | 396 | private function calculateStoreKey($rawKey) |
| 397 | 397 | { |
| 398 | - $str = $this->getPrefix() . $rawKey; |
|
| 398 | + $str = $this->getPrefix().$rawKey; |
|
| 399 | 399 | |
| 400 | 400 | if ($this->adapter instanceof AdapterFile) { |
| 401 | 401 | $str = $this->cleanStoreKey($str); |