Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit33880e2

Browse files
author
Aleksey Prilipko
committed
cs
1 parent3ba1d81 commit33880e2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/Symfony/Component/Cache/Traits/MemcachedTrait.php‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ public static function createConnection($servers, array $options = array())
196196
*
197197
* @param $key
198198
*/
199-
privatestaticfunctionencodeKey($key) {
199+
privatestaticfunctionencodeKey($key)
200+
{
200201
returnrawurlencode($key);
201202
}
202203

@@ -210,9 +211,9 @@ protected function doSave(array $values, $lifetime)
210211
}
211212

212213
if ($this->isTextProtocol) {
213-
$encoded_values =[];
214-
$keyEncoder =[static::class,'encodeKey'];
215-
array_walk($values,function ($value,$key)use(&$encoded_values,$keyEncoder) {$encoded_values[$keyEncoder($key)] =$value; });
214+
$encoded_values =array();
215+
$keyEncoder =array(static::class,'encodeKey');
216+
array_walk($values,function ($value,$key)use(&$encoded_values,$keyEncoder) {$encoded_values[$keyEncoder($key)] =$value; });
216217
$values =$encoded_values;
217218
}
218219

@@ -227,9 +228,10 @@ protected function doFetch(array $ids)
227228
$unserializeCallbackHandler =ini_set('unserialize_callback_func',__CLASS__.'::handleUnserializeCallback');
228229
try {
229230
if ($this->isTextProtocol) {
230-
$keyEncoder =[static::class,'encodeKey'];
231+
$keyEncoder =array(static::class,'encodeKey');
231232
$ids =array_map($keyEncoder,$ids);
232233
}
234+
233235
return$this->checkResultCode($this->getClient()->getMulti($ids));
234236
}catch (\Error$e) {
235237
thrownew \ErrorException($e->getMessage(),$e->getCode(),E_ERROR,$e->getFile(),$e->getLine());
@@ -299,6 +301,7 @@ private function getClient()
299301

300302
$this->client =$this->lazyClient;
301303
$this->isTextProtocol = !$this->client->getOption(\Memcached::OPT_BINARY_PROTOCOL);
304+
302305
return$this->client;
303306
}
304307
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp