@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | protected function checkExtensionLoaded(): void |
| 31 | 31 | { |
| 32 | - if (! extension_loaded('redis')) { |
|
| 32 | + if (!extension_loaded('redis')) { |
|
| 33 | 33 | throw new \RuntimeException('Extension redis is required to use RedisAdapter.'); |
| 34 | 34 | } |
| 35 | 35 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | $serviceName = $this->makeNamespace($service) . ':failures'; |
| 81 | 81 | |
| 82 | - if (! $this->redis->get($serviceName)) { |
|
| 82 | + if (!$this->redis->get($serviceName)) { |
|
| 83 | 83 | $this->redis->incr($serviceName); |
| 84 | 84 | return (bool) $this->redis->expire($serviceName, $timeWindow); |
| 85 | 85 | } |
@@ -18,11 +18,11 @@ |
||
| 18 | 18 | $circuit->setSettings([ |
| 19 | 19 | 'timeWindow' => 60, // Time for an open circuit (seconds) |
| 20 | 20 | 'failureRateThreshold' => 50, // Fail rate for open the circuit |
| 21 | - 'intervalToHalfOpen' => 30, // Half open time (seconds) |
|
| 21 | + 'intervalToHalfOpen' => 30, // Half open time (seconds) |
|
| 22 | 22 | ]); |
| 23 | 23 | |
| 24 | 24 | // Check circuit status for service |
| 25 | -if (! $circuit->isAvailable()) { |
|
| 25 | +if (!$circuit->isAvailable()) { |
|
| 26 | 26 | die('Circuit is not available!'); |
| 27 | 27 | } |
| 28 | 28 | |