Passed
Push — master ( 86de2c...0deb8f )
by Goffy
03:37
created
lib/Github/Http/Client/Common/Plugin/ErrorPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     {
62 62
         $promise = $next($request);
63 63
 
64
-        return $promise->then(function (ResponseInterface $response) use ($request) {
64
+        return $promise->then(function(ResponseInterface $response) use ($request) {
65 65
             return $this->transformResponseToException($request, $response);
66 66
         });
67 67
     }
Please login to merge, or discard this patch.
lib/Github/Http/Client/Common/Plugin/BaseUriPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
46 46
     {
47
-        $addHostNext = function (RequestInterface $request) use ($next, $first) {
47
+        $addHostNext = function(RequestInterface $request) use ($next, $first) {
48 48
             return $this->addHostPlugin->handleRequest($request, $next, $first);
49 49
         };
50 50
 
Please login to merge, or discard this patch.
lib/Github/Http/Client/Common/Plugin/RedirectPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         ]);
118 118
         $resolver->setAllowedTypes('preserve_header', ['bool', 'array']);
119 119
         $resolver->setAllowedTypes('use_default_for_multiple', 'bool');
120
-        $resolver->setNormalizer('preserve_header', function (OptionsResolver $resolver, $value) {
120
+        $resolver->setNormalizer('preserve_header', function(OptionsResolver $resolver, $value) {
121 121
             if (\is_bool($value) && false === $value) {
122 122
                 return [];
123 123
             }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             return $first($redirectRequest);
145 145
         }
146 146
 
147
-        return $next($request)->then(function (ResponseInterface $response) use ($request, $first): ResponseInterface {
147
+        return $next($request)->then(function(ResponseInterface $response) use ($request, $first): ResponseInterface {
148 148
             $statusCode = $response->getStatusCode();
149 149
 
150 150
             if (!\array_key_exists($statusCode, $this->redirectCodes)) {
Please login to merge, or discard this patch.
lib/Github/Http/Client/Common/Plugin/RetryPlugin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
         $resolver = new OptionsResolver();
71 71
         $resolver->setDefaults([
72 72
             'retries' => 1,
73
-            'error_response_decider' => function (RequestInterface $request, ResponseInterface $response) {
73
+            'error_response_decider' => function(RequestInterface $request, ResponseInterface $response) {
74 74
                 // do not retry client errors
75 75
                 return $response->getStatusCode() >= 500 && $response->getStatusCode() < 600;
76 76
             },
77
-            'exception_decider' => function (RequestInterface $request, ClientExceptionInterface $e) {
77
+            'exception_decider' => function(RequestInterface $request, ClientExceptionInterface $e) {
78 78
                 // do not retry client errors
79 79
                 return !$e instanceof HttpException || $e->getCode() >= 500 && $e->getCode() < 600;
80 80
             },
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     {
104 104
         $chainIdentifier = spl_object_hash((object) $first);
105 105
 
106
-        return $next($request)->then(function (ResponseInterface $response) use ($request, $next, $first, $chainIdentifier) {
106
+        return $next($request)->then(function(ResponseInterface $response) use ($request, $next, $first, $chainIdentifier) {
107 107
             if (!\array_key_exists($chainIdentifier, $this->retryStorage)) {
108 108
                 $this->retryStorage[$chainIdentifier] = 0;
109 109
             }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             }
125 125
 
126 126
             return $response;
127
-        }, function (ClientExceptionInterface $exception) use ($request, $next, $first, $chainIdentifier) {
127
+        }, function(ClientExceptionInterface $exception) use ($request, $next, $first, $chainIdentifier) {
128 128
             if (!\array_key_exists($chainIdentifier, $this->retryStorage)) {
129 129
                 $this->retryStorage[$chainIdentifier] = 0;
130 130
             }
Please login to merge, or discard this patch.
lib/Github/Http/Client/Common/Plugin/CookiePlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             $request = $request->withAddedHeader('Cookie', \implode('; ', array_unique($cookies)));
64 64
         }
65 65
 
66
-        return $next($request)->then(function (ResponseInterface $response) use ($request) {
66
+        return $next($request)->then(function(ResponseInterface $response) use ($request) {
67 67
             if ($response->hasHeader('Set-Cookie')) {
68 68
                 $setCookies = $response->getHeader('Set-Cookie');
69 69
 
Please login to merge, or discard this patch.
lib/Github/Http/Client/Common/Plugin/HistoryPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@
 block discarded – undo
36 36
     {
37 37
         $journal = $this->journal;
38 38
 
39
-        return $next($request)->then(function (ResponseInterface $response) use ($request, $journal) {
39
+        return $next($request)->then(function(ResponseInterface $response) use ($request, $journal) {
40 40
             $journal->addSuccess($request, $response);
41 41
 
42 42
             return $response;
43
-        }, function (ClientExceptionInterface $exception) use ($request, $journal) {
43
+        }, function(ClientExceptionInterface $exception) use ($request, $journal) {
44 44
             $journal->addFailure($request, $exception);
45 45
 
46 46
             throw $exception;
Please login to merge, or discard this patch.
lib/Github/Http/Client/Common/Deferred.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $deferred = new self($this->waitCallback);
60 60
 
61
-        $this->onFulfilledCallbacks[] = function (ResponseInterface $response) use ($onFulfilled, $deferred) {
61
+        $this->onFulfilledCallbacks[] = function(ResponseInterface $response) use ($onFulfilled, $deferred) {
62 62
             try {
63 63
                 if (null !== $onFulfilled) {
64 64
                     $response = $onFulfilled($response);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             }
70 70
         };
71 71
 
72
-        $this->onRejectedCallbacks[] = function (ClientExceptionInterface $exception) use ($onRejected, $deferred) {
72
+        $this->onRejectedCallbacks[] = function(ClientExceptionInterface $exception) use ($onRejected, $deferred) {
73 73
             try {
74 74
                 if (null !== $onRejected) {
75 75
                     $response = $onRejected($exception);
Please login to merge, or discard this patch.
lib/Github/Http/Client/Common/PluginChain.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         $reversedPlugins = array_reverse($this->plugins);
45 45
 
46 46
         foreach ($reversedPlugins as $plugin) {
47
-            $lastCallable = function (RequestInterface $request) use ($plugin, $lastCallable) {
47
+            $lastCallable = function(RequestInterface $request) use ($plugin, $lastCallable) {
48 48
                 return $plugin->handleRequest($request, $lastCallable, $this);
49 49
             };
50 50
         }
Please login to merge, or discard this patch.
lib/Github/Http/Client/Common/PluginClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
         // Else we want to use the synchronous call of the underlying client,
81 81
         // and not the async one in the case we have both an async and sync call
82
-        $pluginChain = $this->createPluginChain($this->plugins, function (RequestInterface $request) {
82
+        $pluginChain = $this->createPluginChain($this->plugins, function(RequestInterface $request) {
83 83
             try {
84 84
                 return new HttpFulfilledPromise($this->client->sendRequest($request));
85 85
             } catch (HttplugException $exception) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function sendAsyncRequest(RequestInterface $request)
97 97
     {
98
-        $pluginChain = $this->createPluginChain($this->plugins, function (RequestInterface $request) {
98
+        $pluginChain = $this->createPluginChain($this->plugins, function(RequestInterface $request) {
99 99
             return $this->client->sendAsyncRequest($request);
100 100
         });
101 101
 
Please login to merge, or discard this patch.