@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | |
31 | 31 | public function __invoke(callable $handler): \Closure |
32 | 32 | { |
33 | - return function (RequestInterface $request, array $options) use ($handler) { |
|
33 | + return function(RequestInterface $request, array $options) use ($handler) { |
|
34 | 34 | |
35 | - if (! $this->circuitBreaker->isAvailable()) { |
|
35 | + if (!$this->circuitBreaker->isAvailable()) { |
|
36 | 36 | throw new CircuitBreakerException( |
37 | 37 | sprintf('"%s" is not available', $this->circuitBreaker->getService()) |
38 | 38 | ); |
@@ -41,12 +41,12 @@ discard block |
||
41 | 41 | $promise = $handler($request, $options); |
42 | 42 | |
43 | 43 | return $promise->then( |
44 | - function (ResponseInterface $response) { |
|
44 | + function(ResponseInterface $response) { |
|
45 | 45 | $this->executeCircuitBreakerOnResponse($response); |
46 | 46 | |
47 | 47 | return $response; |
48 | 48 | }, |
49 | - function (\Throwable $exception) { |
|
49 | + function(\Throwable $exception) { |
|
50 | 50 | $this->circuitBreaker->failure(); |
51 | 51 | throw $exception; |
52 | 52 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | return; |
63 | 63 | } |
64 | 64 | |
65 | - if (! $this->isStatusCodeRangeValid($statusCode)) { |
|
65 | + if (!$this->isStatusCodeRangeValid($statusCode)) { |
|
66 | 66 | $this->circuitBreaker->failure(); |
67 | 67 | return; |
68 | 68 | } |