also looking at this
Apply fixes from StyleCI
#2
6 files
+31
-33
| @@ -2,13 +2,13 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Cion\LaravelCloudflare; |
| 4 | 4 | |
| 5 | use GuzzleHttp\Promise; | |
| 6 | use Psr\Log\LoggerInterface; | |
| 7 | use Illuminate\Support\Collection; | |
| 8 | 5 | use GuzzleHttp\Client as GuzzleClient; |
| 9 | use Psr\Http\Message\ResponseInterface; | |
| 10 | 6 | use GuzzleHttp\Exception\ClientException; |
| 11 | 7 | use GuzzleHttp\Exception\RequestException; |
| 8 | use GuzzleHttp\Promise; | |
| 9 | use Illuminate\Support\Collection; | |
| 10 | use Psr\Http\Message\ResponseInterface; | |
| 11 | use Psr\Log\LoggerInterface; | |
| 12 | 12 | |
| 13 | 13 | class Client |
| 14 | 14 | { |
formatting only · 10 hidden lines
| @@ -30,8 +30,8 @@ class Client formatting only | ||
| 30 | 30 | /** |
| 31 | 31 | * Constructor. |
| 32 | 32 | * |
| 33 | * @param \GuzzleHttp\Client $client | |
| 34 | * @param \Psr\Log\LoggerInterface $logger | |
| 33 | * @param \GuzzleHttp\Client $client | |
| 34 | * @param \Psr\Log\LoggerInterface $logger | |
| 35 | 35 | */ |
| 36 | 36 | public function __construct(GuzzleClient $client, LoggerInterface $logger) |
| 37 | 37 | { |
formatting only · 8 hidden lines
| @@ -67,7 +67,7 @@ class Client formatting only | ||
| 67 | 67 | * |
| 68 | 68 | * The returned promise is fulfilled with a collection of results. |
| 69 | 69 | * |
| 70 | * @param \Illuminate\Support\Collection|\GuzzleHttp\Promise\PromiseInterface[] $promises | |
| 70 | * @param \Illuminate\Support\Collection|\GuzzleHttp\Promise\PromiseInterface[] $promises | |
| 71 | 71 | * @return \GuzzleHttp\Promise\PromiseInterface |
| 72 | 72 | */ |
| 73 | 73 | protected function settle(Collection $promises) |
formatting only · 8 hidden lines
| @@ -86,7 +86,7 @@ class Client formatting only | ||
| 86 | 86 | /** |
| 87 | 87 | * Put the body of the fulfilled promise into the results. |
| 88 | 88 | * |
| 89 | * @param \Illuminate\Support\Collection|object[] $results | |
| 89 | * @param \Illuminate\Support\Collection|object[] $results | |
| 90 | 90 | * @return \Closure |
| 91 | 91 | */ |
| 92 | 92 | protected function onFulfilled(Collection $results) |
formatting only · 8 hidden lines
| @@ -99,7 +99,7 @@ class Client formatting only | ||
| 99 | 99 | /** |
| 100 | 100 | * Handle the rejected promise and put the errors into the results. |
| 101 | 101 | * |
| 102 | * @param \Illuminate\Support\Collection|object[] $results | |
| 102 | * @param \Illuminate\Support\Collection|object[] $results | |
| 103 | 103 | * @return \Closure |
| 104 | 104 | */ |
| 105 | 105 | protected function onRejected(Collection $results) |
formatting only · 8 hidden lines
| @@ -117,7 +117,7 @@ class Client formatting only | ||
| 117 | 117 | /** |
| 118 | 118 | * Transform a request exception into a result object. |
| 119 | 119 | * |
| 120 | * @param \GuzzleHttp\Exception\RequestException $e | |
| 120 | * @param \GuzzleHttp\Exception\RequestException $e | |
| 121 | 121 | * @return \stdClass |
| 122 | 122 | */ |
| 123 | 123 | protected function handleException(RequestException $e) |
formatting only · 8 hidden lines
| @@ -151,7 +151,7 @@ class Client formatting only | ||
| 151 | 151 | /** |
| 152 | 152 | * Transform the response body into a result object. |
| 153 | 153 | * |
| 154 | * @param \Psr\Http\Message\ResponseInterface $response | |
| 154 | * @param \Psr\Http\Message\ResponseInterface $response | |
| 155 | 155 | * @return \stdClass |
| 156 | 156 | */ |
| 157 | 157 | protected function getBody(ResponseInterface $response) |