@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * @return PhpRedisConnection The Sentinel connection containing a configured |
57 | 57 | * PhpRedis Client |
58 | 58 | */ |
59 | - public function connect(array $servers, array $options = [ ]) |
|
59 | + public function connect(array $servers, array $options = []) |
|
60 | 60 | { |
61 | 61 | // Set the initial Sentinel servers. |
62 | 62 | $this->servers = array_map(function ($server) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | // Merge the global options shared by all Sentinel connections with |
67 | 67 | // connection-specific options |
68 | - $clientOpts = array_merge($options, Arr::pull($servers, 'options', [ ])); |
|
68 | + $clientOpts = array_merge($options, Arr::pull($servers, 'options', [])); |
|
69 | 69 | |
70 | 70 | // Extract the array of Sentinel connection options from the rest of |
71 | 71 | // the client options |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | // Lookup the master node. |
122 | 122 | $master = $sentinel->getMasterAddrByName($service); |
123 | - if (is_array($master) && ! count($master)) { |
|
123 | + if (is_array($master) && !count($master)) { |
|
124 | 124 | throw new RedisException(sprintf('No master found for service "%s".', $service)); |
125 | 125 | } |
126 | 126 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | 'host' => $currentHost, |
155 | 155 | 'port' => $currentPort, |
156 | 156 | ] |
157 | - ], array_map(fn ($sentinel) => [ |
|
157 | + ], array_map(fn($sentinel) => [ |
|
158 | 158 | 'host' => $sentinel['ip'], |
159 | 159 | 'port' => $sentinel['port'], |
160 | 160 | ], $sentinel->sentinels($service)) |
@@ -173,14 +173,14 @@ discard block |
||
173 | 173 | { |
174 | 174 | if (is_string($server)) { |
175 | 175 | list($host, $port) = explode(':', $server); |
176 | - if (! $host || ! $port) { |
|
176 | + if (!$host || !$port) { |
|
177 | 177 | throw new RedisException('Could not format the server definition.'); |
178 | 178 | } |
179 | 179 | |
180 | 180 | return ['host' => $host, 'port' => (int) $port]; |
181 | 181 | } |
182 | 182 | |
183 | - if (! is_array($server)) { |
|
183 | + if (!is_array($server)) { |
|
184 | 184 | throw new RedisException('Could not format the server definition.'); |
185 | 185 | } |
186 | 186 |