@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | use chillerlan\Settings\SettingsContainerInterface; |
| 16 | 16 | use Memcached; |
| 17 | 17 | |
| 18 | -class MemcachedCache extends CacheDriverAbstract{ |
|
| 18 | +class MemcachedCache extends CacheDriverAbstract { |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @var \Memcached |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @throws \chillerlan\SimpleCache\CacheException |
| 32 | 32 | */ |
| 33 | - public function __construct(Memcached $memcached, SettingsContainerInterface $options = null){ |
|
| 33 | + public function __construct(Memcached $memcached, SettingsContainerInterface $options = null) { |
|
| 34 | 34 | parent::__construct($options); |
| 35 | 35 | |
| 36 | 36 | $this->memcached = $memcached; |
| 37 | 37 | |
| 38 | - if(empty($this->memcached->getServerList())){ |
|
| 38 | + if (empty($this->memcached->getServerList())) { |
|
| 39 | 39 | $msg = 'no memcache server available'; |
| 40 | 40 | |
| 41 | 41 | $this->logger->error($msg); |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** @inheritdoc */ |
| 48 | - public function get($key, $default = null){ |
|
| 48 | + public function get($key, $default = null) { |
|
| 49 | 49 | $value = $this->memcached->get($this->checkKey($key)); |
| 50 | 50 | |
| 51 | - if($value !== false){ |
|
| 51 | + if ($value !== false) { |
|
| 52 | 52 | return $value; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $values = $this->memcached->getMulti($keys); |
| 80 | 80 | $return = []; |
| 81 | 81 | |
| 82 | - foreach($keys as $key){ |
|
| 82 | + foreach ($keys as $key) { |
|
| 83 | 83 | $return[$key] = $values[$key] ?? $default; |
| 84 | 84 | } |
| 85 | 85 | |