@@ -57,14 +57,14 @@ discard block |
||
| 57 | 57 | * @return PhpRedisConnection The Sentinel connection containing a configured |
| 58 | 58 | * PhpRedis Client |
| 59 | 59 | */ |
| 60 | - public function connect(array $servers, array $options = [ ]) |
|
| 60 | + public function connect(array $servers, array $options = []) |
|
| 61 | 61 | { |
| 62 | 62 | // Set the initial Sentinel servers. |
| 63 | 63 | $this->servers = $servers; |
| 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 |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | 'host' => $host, |
| 124 | 124 | 'port' => $port, |
| 125 | 125 | ] |
| 126 | - ], array_map(fn ($sentinel) => [ |
|
| 126 | + ], array_map(fn($sentinel) => [ |
|
| 127 | 127 | 'host' => $sentinel['ip'], |
| 128 | 128 | 'port' => $sentinel['port'], |
| 129 | 129 | ], $sentinel->sentinels($service)) |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | // Lookup the master node. |
| 134 | 134 | $master = $sentinel->getMasterAddrByName($service); |
| 135 | - if (! is_array($master) || ! count($master)) { |
|
| 135 | + if (!is_array($master) || !count($master)) { |
|
| 136 | 136 | throw new RedisException(sprintf('No master found for service "%s".', $service)); |
| 137 | 137 | } |
| 138 | 138 | |