@@ -49,7 +49,7 @@ |
||
49 | 49 | * Create a new Redis Sentinel connection from the provided configuration |
50 | 50 | * options |
51 | 51 | * |
52 | - * @param array $server The client configuration for the connection |
|
52 | + * @param array $servers The client configuration for the connection |
|
53 | 53 | * @param array $options The global client options shared by all Sentinel |
54 | 54 | * connections |
55 | 55 | * |
@@ -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 | |
@@ -175,14 +175,14 @@ discard block |
||
175 | 175 | { |
176 | 176 | if (is_string($server)) { |
177 | 177 | list($host, $port) = explode(':', $server); |
178 | - if (! $host || ! $port) { |
|
178 | + if (!$host || !$port) { |
|
179 | 179 | throw new RedisException('Could not format the server definition.'); |
180 | 180 | } |
181 | 181 | |
182 | 182 | return ['host' => $host, 'port' => (int) $port]; |
183 | 183 | } |
184 | 184 | |
185 | - if (! is_array($server)) { |
|
185 | + if (!is_array($server)) { |
|
186 | 186 | throw new RedisException('Could not format the server definition.'); |
187 | 187 | } |
188 | 188 |