Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 51d13cc

Browse filesBrowse files
committed
fixed CS
1 parent b79c716 commit 51d13cc
Copy full SHA for 51d13cc

File tree

1 file changed

+7
-9
lines changed
Filter options

1 file changed

+7
-9
lines changed

‎src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php
+7-9Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,23 @@ class MemcachedAdapter extends AbstractAdapter
1818
{
1919
private $client;
2020

21-
public static function isSupported()
22-
{
23-
return extension_loaded('memcached') && version_compare(phpversion('memcached'), '2.2.0', '>=');
24-
}
25-
2621
public function __construct(\Memcached $client, $namespace = '', $defaultLifetime = 0)
2722
{
2823
parent::__construct($namespace, $defaultLifetime);
2924
$this->client = $client;
3025
}
3126

27+
public static function isSupported()
28+
{
29+
return extension_loaded('memcached') && version_compare(phpversion('memcached'), '2.2.0', '>=');
30+
}
31+
3232
/**
3333
* {@inheritdoc}
3434
*/
3535
protected function doSave(array $values, $lifetime)
3636
{
37-
return $this->client->setMulti($values, $lifetime)
38-
&& $this->client->getResultCode() === \Memcached::RES_SUCCESS;
37+
return $this->client->setMulti($values, $lifetime) && $this->client->getResultCode() === \Memcached::RES_SUCCESS;
3938
}
4039

4140
/**
@@ -51,8 +50,7 @@ protected function doFetch(array $ids)
5150
*/
5251
protected function doHave($id)
5352
{
54-
return $this->client->get($id) !== false
55-
|| $this->client->getResultCode() === \Memcached::RES_SUCCESS;
53+
return $this->client->get($id) !== false || $this->client->getResultCode() === \Memcached::RES_SUCCESS;
5654
}
5755

5856
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.