@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * @return PhpRedisConnection The Sentinel connection containing a configured |
56 | 56 | * PhpRedis Client |
57 | 57 | */ |
58 | - public function connect(array $servers, array $options = [ ]) |
|
58 | + public function connect(array $servers, array $options = []) |
|
59 | 59 | { |
60 | 60 | // Set the initial Sentinel servers. |
61 | 61 | $this->servers = array_map(function ($server) { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | // Merge the global options shared by all Sentinel connections with |
66 | 66 | // connection-specific options |
67 | - $clientOpts = array_merge($options, Arr::pull($servers, 'options', [ ])); |
|
67 | + $clientOpts = array_merge($options, Arr::pull($servers, 'options', [])); |
|
68 | 68 | |
69 | 69 | // Extract the array of Sentinel connection options from the rest of |
70 | 70 | // the client options |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | 'host' => $host, |
121 | 121 | 'port' => $port, |
122 | 122 | ] |
123 | - ], array_map(fn ($sentinel) => [ |
|
123 | + ], array_map(fn($sentinel) => [ |
|
124 | 124 | 'host' => $sentinel['ip'], |
125 | 125 | 'port' => $sentinel['port'], |
126 | 126 | ], $sentinel->sentinels($service)) |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | // Lookup the master node. |
131 | 131 | $master = $sentinel->getMasterAddrByName($service); |
132 | - if (! is_array($master) || ! count($master)) { |
|
132 | + if (!is_array($master) || !count($master)) { |
|
133 | 133 | throw new RedisException(sprintf('No master found for service "%s".', $service)); |
134 | 134 | } |
135 | 135 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | return ['host' => $host, 'port' => $port]; |
164 | 164 | } |
165 | 165 | |
166 | - if (! is_array($server)) { |
|
166 | + if (!is_array($server)) { |
|
167 | 167 | throw new RedisException('Could not format the server definition.'); |
168 | 168 | } |
169 | 169 |