@@ -68,11 +68,11 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function __construct() |
70 | 70 | { |
71 | - if (! extension_loaded('redis')) { |
|
71 | + if (!extension_loaded('redis')) { |
|
72 | 72 | throw new LogicException('Please make sure the PHP Redis extension is installed and enabled.'); |
73 | 73 | } |
74 | 74 | |
75 | - if (! class_exists(RedisSentinel::class)) { |
|
75 | + if (!class_exists(RedisSentinel::class)) { |
|
76 | 76 | throw new LogicException('Please make sure the PHP Redis extension is up to date (5.3.4 or greater).'); |
77 | 77 | } |
78 | 78 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * @return PhpRedisConnection The Sentinel connection containing a configured |
89 | 89 | * PhpRedis Client |
90 | 90 | */ |
91 | - public function connect(array $servers, array $options = [ ]) |
|
91 | + public function connect(array $servers, array $options = []) |
|
92 | 92 | { |
93 | 93 | // Set the initial Sentinel servers. |
94 | 94 | $this->servers = array_map(function ($server) { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | // Merge the global options shared by all Sentinel connections with |
109 | 109 | // connection-specific options |
110 | - $clientOpts = array_merge($options, Arr::pull($servers, 'options', [ ])); |
|
110 | + $clientOpts = array_merge($options, Arr::pull($servers, 'options', [])); |
|
111 | 111 | |
112 | 112 | // Extract the array of Sentinel connection options from the rest of |
113 | 113 | // the client options |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | |
172 | 172 | // Lookup the master node. |
173 | 173 | $master = $sentinel->getMasterAddrByName($sentinelService); |
174 | - if (is_array($master) && ! count($master)) { |
|
174 | + if (is_array($master) && !count($master)) { |
|
175 | 175 | throw new RedisException(sprintf('No master found for service "%s".', $sentinelService)); |
176 | 176 | } |
177 | 177 | |
@@ -227,14 +227,14 @@ discard block |
||
227 | 227 | { |
228 | 228 | if (is_string($server)) { |
229 | 229 | list($host, $port) = explode(':', $server); |
230 | - if (! $host || ! $port) { |
|
230 | + if (!$host || !$port) { |
|
231 | 231 | throw new RedisException('Could not format the server definition.'); |
232 | 232 | } |
233 | 233 | |
234 | 234 | return ['host' => $host, 'port' => (int) $port]; |
235 | 235 | } |
236 | 236 | |
237 | - if (! is_array($server)) { |
|
237 | + if (!is_array($server)) { |
|
238 | 238 | throw new RedisException('Could not format the server definition.'); |
239 | 239 | } |
240 | 240 |