Passed
Push — main ( 6a339e...523722 )
by Eric
02:31
created
tests/src/ClientTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         $client->enableRetryAttempts();
231 231
         $client->setMaxRetryAttempts(1);
232 232
 
233
-        $client->build(['persistentHeaders' => ['Accept' => 'application/json'],]);
233
+        $client->build(['persistentHeaders' => ['Accept' => 'application/json'], ]);
234 234
 
235 235
         $this->expectException(RateLimitExceededException::class);
236 236
         $response = $client->send('GET', '429');
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $client->enableRetryAttempts();
249 249
         $client->setMaxRetryAttempts(1);
250 250
 
251
-        $client->build(['persistentHeaders' => ['Accept' => 'application/json'],]);
251
+        $client->build(['persistentHeaders' => ['Accept' => 'application/json'], ]);
252 252
 
253 253
         $this->expectException(ServerException::class);
254 254
         $response = $client->send('GET', '500');
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
             $handlerStack->push(Middleware::retry($this->retryDecider(), $this->retryDelay()));
306 306
         }
307 307
 
308
-        $defaultOptions += ['handler' => $handlerStack,];
308
+        $defaultOptions += ['handler' => $handlerStack, ];
309 309
 
310 310
         // Attempt instantiating the client. Generally we should only run into issues if any options
311 311
         // passed to Guzzle are incorrectly defined/configured.
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
      */
415 415
     private function retryDecider(): Closure
416 416
     {
417
-        return function (
417
+        return function(
418 418
             int $retries,
419 419
             RequestInterface $request,
420 420
             ?ResponseInterface $response = null,
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
      */
447 447
     private function retryDelay(): Closure
448 448
     {
449
-        return static function (int $numberOfRetries, ResponseInterface $response): int {
449
+        return static function(int $numberOfRetries, ResponseInterface $response): int {
450 450
             if (!$response->hasHeader('Retry-After')) {
451 451
                 return RetryMiddleware::exponentialDelay($numberOfRetries);
452 452
             }
Please login to merge, or discard this patch.