@@ -6,18 +6,18 @@ |
||
6 | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | |
8 | 8 | return array( |
9 | - '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', |
|
10 | - 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', |
|
11 | - 'cf97c57bfe0f23854afd2f3818abb7a0' => $vendorDir . '/zendframework/zend-diactoros/src/functions/create_uploaded_file.php', |
|
12 | - '9bf37a3d0dad93e29cb4e1b1bfab04e9' => $vendorDir . '/zendframework/zend-diactoros/src/functions/marshal_headers_from_sapi.php', |
|
13 | - 'ce70dccb4bcc2efc6e94d2ee526e6972' => $vendorDir . '/zendframework/zend-diactoros/src/functions/marshal_method_from_sapi.php', |
|
14 | - 'f86420df471f14d568bfcb71e271b523' => $vendorDir . '/zendframework/zend-diactoros/src/functions/marshal_protocol_version_from_sapi.php', |
|
15 | - 'b87481e008a3700344428ae089e7f9e5' => $vendorDir . '/zendframework/zend-diactoros/src/functions/marshal_uri_from_sapi.php', |
|
16 | - '0b0974a5566a1077e4f2e111341112c1' => $vendorDir . '/zendframework/zend-diactoros/src/functions/normalize_server.php', |
|
17 | - '1ca3bc274755662169f9629d5412a1da' => $vendorDir . '/zendframework/zend-diactoros/src/functions/normalize_uploaded_files.php', |
|
18 | - '40360c0b9b437e69bcbb7f1349ce029e' => $vendorDir . '/zendframework/zend-diactoros/src/functions/parse_cookie_header.php', |
|
19 | - 'ddc0a4d7e61c0286f0f8593b1903e894' => $vendorDir . '/clue/stream-filter/src/functions.php', |
|
20 | - '8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php', |
|
21 | - '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', |
|
22 | - '9077b4d8b12bf36c716ea93b712cf7a4' => $vendorDir . '/sentry/sentry/src/Sdk.php', |
|
9 | + '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir.'/ralouphie/getallheaders/src/getallheaders.php', |
|
10 | + 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir.'/guzzlehttp/psr7/src/functions_include.php', |
|
11 | + 'cf97c57bfe0f23854afd2f3818abb7a0' => $vendorDir.'/zendframework/zend-diactoros/src/functions/create_uploaded_file.php', |
|
12 | + '9bf37a3d0dad93e29cb4e1b1bfab04e9' => $vendorDir.'/zendframework/zend-diactoros/src/functions/marshal_headers_from_sapi.php', |
|
13 | + 'ce70dccb4bcc2efc6e94d2ee526e6972' => $vendorDir.'/zendframework/zend-diactoros/src/functions/marshal_method_from_sapi.php', |
|
14 | + 'f86420df471f14d568bfcb71e271b523' => $vendorDir.'/zendframework/zend-diactoros/src/functions/marshal_protocol_version_from_sapi.php', |
|
15 | + 'b87481e008a3700344428ae089e7f9e5' => $vendorDir.'/zendframework/zend-diactoros/src/functions/marshal_uri_from_sapi.php', |
|
16 | + '0b0974a5566a1077e4f2e111341112c1' => $vendorDir.'/zendframework/zend-diactoros/src/functions/normalize_server.php', |
|
17 | + '1ca3bc274755662169f9629d5412a1da' => $vendorDir.'/zendframework/zend-diactoros/src/functions/normalize_uploaded_files.php', |
|
18 | + '40360c0b9b437e69bcbb7f1349ce029e' => $vendorDir.'/zendframework/zend-diactoros/src/functions/parse_cookie_header.php', |
|
19 | + 'ddc0a4d7e61c0286f0f8593b1903e894' => $vendorDir.'/clue/stream-filter/src/functions.php', |
|
20 | + '8cff32064859f4559445b89279f3199c' => $vendorDir.'/php-http/message/src/filters.php', |
|
21 | + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir.'/symfony/polyfill-ctype/bootstrap.php', |
|
22 | + '9077b4d8b12bf36c716ea93b712cf7a4' => $vendorDir.'/sentry/sentry/src/Sdk.php', |
|
23 | 23 | ); |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | private function findFileWithExtension($class, $ext) |
373 | 373 | { |
374 | 374 | // PSR-4 lookup |
375 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
375 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
376 | 376 | |
377 | 377 | $first = $class[0]; |
378 | 378 | if (isset($this->prefixLengthsPsr4[$first])) { |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | if (isset($this->prefixDirsPsr4[$search])) { |
384 | 384 | foreach ($this->prefixDirsPsr4[$search] as $dir) { |
385 | 385 | $length = $this->prefixLengthsPsr4[$first][$search]; |
386 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { |
|
386 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $length))) { |
|
387 | 387 | return $file; |
388 | 388 | } |
389 | 389 | } |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | |
394 | 394 | // PSR-4 fallback dirs |
395 | 395 | foreach ($this->fallbackDirsPsr4 as $dir) { |
396 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
396 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
397 | 397 | return $file; |
398 | 398 | } |
399 | 399 | } |
@@ -405,14 +405,14 @@ discard block |
||
405 | 405 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
406 | 406 | } else { |
407 | 407 | // PEAR-like class name |
408 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
408 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | if (isset($this->prefixesPsr0[$first])) { |
412 | 412 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
413 | 413 | if (0 === strpos($class, $prefix)) { |
414 | 414 | foreach ($dirs as $dir) { |
415 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
415 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
416 | 416 | return $file; |
417 | 417 | } |
418 | 418 | } |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | |
423 | 423 | // PSR-0 fallback dirs |
424 | 424 | foreach ($this->fallbackDirsPsr0 as $dir) { |
425 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
425 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
426 | 426 | return $file; |
427 | 427 | } |
428 | 428 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } catch (UnexpectedValueException $e) { |
214 | 214 | throw new Exception\RequestException($e->getMessage(), $request); |
215 | 215 | } |
216 | - $curlOptions[CURLOPT_URL] = (string)$request->getUri(); |
|
216 | + $curlOptions[CURLOPT_URL] = (string) $request->getUri(); |
|
217 | 217 | |
218 | 218 | $curlOptions = $this->addRequestBodyOptions($request, $curlOptions); |
219 | 219 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $curlOptions[CURLOPT_USERPWD] = $request->getUri()->getUserInfo(); |
224 | 224 | } |
225 | 225 | |
226 | - $curlOptions[CURLOPT_HEADERFUNCTION] = function ($ch, $data) use ($responseBuilder) { |
|
226 | + $curlOptions[CURLOPT_HEADERFUNCTION] = function($ch, $data) use ($responseBuilder) { |
|
227 | 227 | $str = trim($data); |
228 | 228 | if ('' !== $str) { |
229 | 229 | if (stripos($str, 'http/') === 0) { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | return strlen($data); |
237 | 237 | }; |
238 | 238 | |
239 | - $curlOptions[CURLOPT_WRITEFUNCTION] = function ($ch, $data) use ($responseBuilder) { |
|
239 | + $curlOptions[CURLOPT_WRITEFUNCTION] = function($ch, $data) use ($responseBuilder) { |
|
240 | 240 | return $responseBuilder->getResponse()->getBody()->write($data); |
241 | 241 | }; |
242 | 242 | |
@@ -302,12 +302,12 @@ discard block |
||
302 | 302 | if (null !== $bodySize) { |
303 | 303 | $curlOptions[CURLOPT_INFILESIZE] = $bodySize; |
304 | 304 | } |
305 | - $curlOptions[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { |
|
305 | + $curlOptions[CURLOPT_READFUNCTION] = function($ch, $fd, $length) use ($body) { |
|
306 | 306 | return $body->read($length); |
307 | 307 | }; |
308 | 308 | } else { |
309 | 309 | // Small body can be loaded into memory |
310 | - $curlOptions[CURLOPT_POSTFIELDS] = (string)$body; |
|
310 | + $curlOptions[CURLOPT_POSTFIELDS] = (string) $body; |
|
311 | 311 | } |
312 | 312 | } |
313 | 313 | } |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | } |
352 | 352 | } |
353 | 353 | foreach ($values as $value) { |
354 | - $curlHeaders[] = $name . ': ' . $value; |
|
354 | + $curlHeaders[] = $name.': '.$value; |
|
355 | 355 | } |
356 | 356 | } |
357 | 357 | /* |
@@ -223,7 +223,8 @@ discard block |
||
223 | 223 | $curlOptions[CURLOPT_USERPWD] = $request->getUri()->getUserInfo(); |
224 | 224 | } |
225 | 225 | |
226 | - $curlOptions[CURLOPT_HEADERFUNCTION] = function ($ch, $data) use ($responseBuilder) { |
|
226 | + $curlOptions[CURLOPT_HEADERFUNCTION] = function ($ch, $data) use ($responseBuilder) |
|
227 | + { |
|
227 | 228 | $str = trim($data); |
228 | 229 | if ('' !== $str) { |
229 | 230 | if (stripos($str, 'http/') === 0) { |
@@ -236,7 +237,8 @@ discard block |
||
236 | 237 | return strlen($data); |
237 | 238 | }; |
238 | 239 | |
239 | - $curlOptions[CURLOPT_WRITEFUNCTION] = function ($ch, $data) use ($responseBuilder) { |
|
240 | + $curlOptions[CURLOPT_WRITEFUNCTION] = function ($ch, $data) use ($responseBuilder) |
|
241 | + { |
|
240 | 242 | return $responseBuilder->getResponse()->getBody()->write($data); |
241 | 243 | }; |
242 | 244 | |
@@ -302,7 +304,8 @@ discard block |
||
302 | 304 | if (null !== $bodySize) { |
303 | 305 | $curlOptions[CURLOPT_INFILESIZE] = $bodySize; |
304 | 306 | } |
305 | - $curlOptions[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { |
|
307 | + $curlOptions[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) |
|
308 | + { |
|
306 | 309 | return $body->read($length); |
307 | 310 | }; |
308 | 311 | } else { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | protected function chooseHttpClient(): HttpClientPoolItem |
20 | 20 | { |
21 | - $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) { |
|
21 | + $clientPool = array_filter($this->clientPool, function(HttpClientPoolItem $clientPoolItem) { |
|
22 | 22 | return !$clientPoolItem->isDisabled(); |
23 | 23 | }); |
24 | 24 |
@@ -18,7 +18,8 @@ |
||
18 | 18 | */ |
19 | 19 | protected function chooseHttpClient(): HttpClientPoolItem |
20 | 20 | { |
21 | - $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) { |
|
21 | + $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) |
|
22 | + { |
|
22 | 23 | return !$clientPoolItem->isDisabled(); |
23 | 24 | }); |
24 | 25 |
@@ -98,11 +98,11 @@ |
||
98 | 98 | |
99 | 99 | $this->incrementRequestCount(); |
100 | 100 | |
101 | - return $this->client->sendAsyncRequest($request)->then(function ($response) { |
|
101 | + return $this->client->sendAsyncRequest($request)->then(function($response) { |
|
102 | 102 | $this->decrementRequestCount(); |
103 | 103 | |
104 | 104 | return $response; |
105 | - }, function ($exception) { |
|
105 | + }, function($exception) { |
|
106 | 106 | $this->disable(); |
107 | 107 | $this->decrementRequestCount(); |
108 | 108 |
@@ -98,11 +98,13 @@ |
||
98 | 98 | |
99 | 99 | $this->incrementRequestCount(); |
100 | 100 | |
101 | - return $this->client->sendAsyncRequest($request)->then(function ($response) { |
|
101 | + return $this->client->sendAsyncRequest($request)->then(function ($response) |
|
102 | + { |
|
102 | 103 | $this->decrementRequestCount(); |
103 | 104 | |
104 | 105 | return $response; |
105 | - }, function ($exception) { |
|
106 | + }, function ($exception) |
|
107 | + { |
|
106 | 108 | $this->disable(); |
107 | 109 | $this->decrementRequestCount(); |
108 | 110 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | protected function chooseHttpClient(): HttpClientPoolItem |
22 | 22 | { |
23 | - $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) { |
|
23 | + $clientPool = array_filter($this->clientPool, function(HttpClientPoolItem $clientPoolItem) { |
|
24 | 24 | return !$clientPoolItem->isDisabled(); |
25 | 25 | }); |
26 | 26 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | throw new HttpClientNotFoundException('Cannot choose a http client as there is no one present in the pool'); |
29 | 29 | } |
30 | 30 | |
31 | - usort($clientPool, function (HttpClientPoolItem $clientA, HttpClientPoolItem $clientB) { |
|
31 | + usort($clientPool, function(HttpClientPoolItem $clientA, HttpClientPoolItem $clientB) { |
|
32 | 32 | if ($clientA->getSendingRequestCount() === $clientB->getSendingRequestCount()) { |
33 | 33 | return 0; |
34 | 34 | } |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | */ |
21 | 21 | protected function chooseHttpClient(): HttpClientPoolItem |
22 | 22 | { |
23 | - $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) { |
|
23 | + $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) |
|
24 | + { |
|
24 | 25 | return !$clientPoolItem->isDisabled(); |
25 | 26 | }); |
26 | 27 | |
@@ -28,7 +29,8 @@ discard block |
||
28 | 29 | throw new HttpClientNotFoundException('Cannot choose a http client as there is no one present in the pool'); |
29 | 30 | } |
30 | 31 | |
31 | - usort($clientPool, function (HttpClientPoolItem $clientA, HttpClientPoolItem $clientB) { |
|
32 | + usort($clientPool, function (HttpClientPoolItem $clientA, HttpClientPoolItem $clientB) |
|
33 | + { |
|
32 | 34 | if ($clientA->getSendingRequestCount() === $clientB->getSendingRequestCount()) { |
33 | 35 | return 0; |
34 | 36 | } |
@@ -58,7 +58,7 @@ discard block |
||
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 |
||
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); |
@@ -58,7 +58,8 @@ discard block |
||
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 | 63 | try { |
63 | 64 | if (null !== $onFulfilled) { |
64 | 65 | $response = $onFulfilled($response); |
@@ -69,7 +70,8 @@ discard block |
||
69 | 70 | } |
70 | 71 | }; |
71 | 72 | |
72 | - $this->onRejectedCallbacks[] = function (ClientExceptionInterface $exception) use ($onRejected, $deferred) { |
|
73 | + $this->onRejectedCallbacks[] = function (ClientExceptionInterface $exception) use ($onRejected, $deferred) |
|
74 | + { |
|
73 | 75 | try { |
74 | 76 | if (null !== $onRejected) { |
75 | 77 | $response = $onRejected($exception); |
@@ -36,11 +36,11 @@ |
||
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; |
@@ -36,11 +36,13 @@ |
||
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 | 41 | $journal->addSuccess($request, $response); |
41 | 42 | |
42 | 43 | return $response; |
43 | - }, function (ClientExceptionInterface $exception) use ($request, $journal) { |
|
44 | + }, function (ClientExceptionInterface $exception) use ($request, $journal) |
|
45 | + { |
|
44 | 46 | $journal->addFailure($request, $exception); |
45 | 47 | |
46 | 48 | throw $exception; |
@@ -63,7 +63,7 @@ |
||
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 |
@@ -63,7 +63,8 @@ |
||
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 | 68 | if ($response->hasHeader('Set-Cookie')) { |
68 | 69 | $setCookies = $response->getHeader('Set-Cookie'); |
69 | 70 |