@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | $client = new Predis\Client($single_server); |
19 | 19 | |
20 | -$responses = $client->pipeline(function ($pipe) { |
|
20 | +$responses = $client->pipeline(function($pipe) { |
|
21 | 21 | $pipe->flushdb(); |
22 | 22 | $pipe->incrby('counter', 10); |
23 | 23 | $pipe->incrby('counter', 30); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $dispatcher->attachCallback('events', ($events = new EventsListener())); |
62 | 62 | |
63 | 63 | // Attach a function to control the dispatcher loop termination with a message. |
64 | -$dispatcher->attachCallback('control', function ($payload) use ($dispatcher) { |
|
64 | +$dispatcher->attachCallback('control', function($payload) use ($dispatcher) { |
|
65 | 65 | if ($payload === 'terminate_dispatcher') { |
66 | 66 | $dispatcher->stop(); |
67 | 67 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | public function remove($node) |
41 | 41 | { |
42 | - $this->nodes = array_filter($this->nodes, function ($n) use ($node) { |
|
42 | + $this->nodes = array_filter($this->nodes, function($n) use ($node) { |
|
43 | 43 | return $n !== $node; |
44 | 44 | }); |
45 | 45 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | $options = array( |
91 | - 'cluster' => function () { |
|
91 | + 'cluster' => function() { |
|
92 | 92 | $distributor = new NaiveDistributor(); |
93 | 93 | $strategy = new PredisStrategy($distributor); |
94 | 94 | $cluster = new PredisCluster($strategy); |
@@ -28,17 +28,17 @@ |
||
28 | 28 | { |
29 | 29 | $element = null; |
30 | 30 | $options = array( |
31 | - 'cas' => true, // Initialize with support for CAS operations |
|
32 | - 'watch' => $key, // Key that needs to be WATCHed to detect changes |
|
33 | - 'retry' => 3, // Number of retries on aborted transactions, after |
|
31 | + 'cas' => true, // Initialize with support for CAS operations |
|
32 | + 'watch' => $key, // Key that needs to be WATCHed to detect changes |
|
33 | + 'retry' => 3, // Number of retries on aborted transactions, after |
|
34 | 34 | // which the client bails out with an exception. |
35 | 35 | ); |
36 | 36 | |
37 | - $client->transaction($options, function ($tx) use ($key, &$element) { |
|
37 | + $client->transaction($options, function($tx) use ($key, &$element) { |
|
38 | 38 | @list($element) = $tx->zrange($key, 0, 0); |
39 | 39 | |
40 | 40 | if (isset($element)) { |
41 | - $tx->multi(); // With CAS, MULTI *must* be explicitly invoked. |
|
41 | + $tx->multi(); // With CAS, MULTI *must* be explicitly invoked. |
|
42 | 42 | $tx->zrem($key, $element); |
43 | 43 | } |
44 | 44 | }); |
@@ -52,13 +52,13 @@ |
||
52 | 52 | ); |
53 | 53 | |
54 | 54 | $options = array( |
55 | - 'profile' => function ($options, $option) { |
|
55 | + 'profile' => function($options, $option) { |
|
56 | 56 | $profile = $options->getDefault($option); |
57 | 57 | $profile->defineCommand('hmgetall', 'HashMultipleGetAll'); |
58 | 58 | |
59 | 59 | return $profile; |
60 | 60 | }, |
61 | - 'replication' => function () { |
|
61 | + 'replication' => function() { |
|
62 | 62 | $strategy = new ReplicationStrategy(); |
63 | 63 | $strategy->setScriptReadOnly(HashMultipleGetAll::BODY); |
64 | 64 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | $client = new Predis\Client($single_server, array( |
53 | - 'profile' => function ($options) { |
|
53 | + 'profile' => function($options) { |
|
54 | 54 | $profile = $options->getDefault('profile'); |
55 | 55 | $profile->defineCommand('increxby', 'IncrementExistingKeysBy'); |
56 | 56 |
@@ -145,7 +145,7 @@ |
||
145 | 145 | $client = null; |
146 | 146 | $event = $this->client->getConnection()->read(); |
147 | 147 | |
148 | - $callback = function ($matches) use (&$database, &$client) { |
|
148 | + $callback = function($matches) use (&$database, &$client) { |
|
149 | 149 | if (2 === $count = count($matches)) { |
150 | 150 | // Redis <= 2.4 |
151 | 151 | $database = (int) $matches[1]; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | { |
53 | 53 | if (0 === strpos($className, $this->prefix)) { |
54 | 54 | $parts = explode('\\', substr($className, $this->prefixLength)); |
55 | - $filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php'; |
|
55 | + $filepath = $this->directory . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $parts) . '.php'; |
|
56 | 56 | |
57 | 57 | if (is_file($filepath)) { |
58 | 58 | require($filepath); |
@@ -114,7 +114,7 @@ |
||
114 | 114 | { |
115 | 115 | if (!$processor instanceof ProcessorInterface) { |
116 | 116 | throw new InvalidArgumentException( |
117 | - "A processor chain accepts only instances of ". |
|
117 | + "A processor chain accepts only instances of " . |
|
118 | 118 | "'Predis\Command\Processor\ProcessorInterface'." |
119 | 119 | ); |
120 | 120 | } |