fixed CS
This commit is contained in:
parent
b79c716147
commit
51d13cc73a
@ -18,24 +18,23 @@ class MemcachedAdapter extends AbstractAdapter
|
||||
{
|
||||
private $client;
|
||||
|
||||
public static function isSupported()
|
||||
{
|
||||
return extension_loaded('memcached') && version_compare(phpversion('memcached'), '2.2.0', '>=');
|
||||
}
|
||||
|
||||
public function __construct(\Memcached $client, $namespace = '', $defaultLifetime = 0)
|
||||
{
|
||||
parent::__construct($namespace, $defaultLifetime);
|
||||
$this->client = $client;
|
||||
}
|
||||
|
||||
public static function isSupported()
|
||||
{
|
||||
return extension_loaded('memcached') && version_compare(phpversion('memcached'), '2.2.0', '>=');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function doSave(array $values, $lifetime)
|
||||
{
|
||||
return $this->client->setMulti($values, $lifetime)
|
||||
&& $this->client->getResultCode() === \Memcached::RES_SUCCESS;
|
||||
return $this->client->setMulti($values, $lifetime) && $this->client->getResultCode() === \Memcached::RES_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -51,8 +50,7 @@ class MemcachedAdapter extends AbstractAdapter
|
||||
*/
|
||||
protected function doHave($id)
|
||||
{
|
||||
return $this->client->get($id) !== false
|
||||
|| $this->client->getResultCode() === \Memcached::RES_SUCCESS;
|
||||
return $this->client->get($id) !== false || $this->client->getResultCode() === \Memcached::RES_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user