@@ -81,8 +81,7 @@ |
||
81 | 81 | |
82 | 82 | try { |
83 | 83 | $response = $this->client->request($request); |
84 | - } |
|
85 | - catch (\Throwable $exception) { |
|
84 | + } catch (\Throwable $exception) { |
|
86 | 85 | $exceptionEvent = new ExceptionEvent($request, $exception); |
87 | 86 | $this->dispatcher->dispatch($this->exceptionEvent, $exceptionEvent); |
88 | 87 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\HttpClient\Decorator; |
5 | 5 | |
@@ -86,13 +86,13 @@ discard block |
||
86 | 86 | $exceptionEvent = new ExceptionEvent($request, $exception); |
87 | 87 | $this->dispatcher->dispatch($this->exceptionEvent, $exceptionEvent); |
88 | 88 | |
89 | - if (! $exceptionEvent->hasResponse()) { |
|
89 | + if (!$exceptionEvent->hasResponse()) { |
|
90 | 90 | throw $this->handleException($exception, $request); |
91 | 91 | } |
92 | 92 | |
93 | 93 | $response = $exceptionEvent->getResponse(); |
94 | 94 | |
95 | - if (! $exceptionEvent->isResponseEventEnabled()) { |
|
95 | + if (!$exceptionEvent->isResponseEventEnabled()) { |
|
96 | 96 | return $response; |
97 | 97 | } |
98 | 98 | } |
@@ -41,8 +41,7 @@ |
||
41 | 41 | { |
42 | 42 | try { |
43 | 43 | return $this->client->send($request); |
44 | - } |
|
45 | - catch (GuzzleRequestException $exception) { |
|
44 | + } catch (GuzzleRequestException $exception) { |
|
46 | 45 | throw $this->createException($exception); |
47 | 46 | } |
48 | 47 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\HttpClient\Adapter; |
5 | 5 |
@@ -88,8 +88,7 @@ |
||
88 | 88 | |
89 | 89 | try { |
90 | 90 | $response = $this->client->request($request); |
91 | - } |
|
92 | - catch (ResponseException $exception) { |
|
91 | + } catch (ResponseException $exception) { |
|
93 | 92 | $responseRaw = $exception->getResponse(); |
94 | 93 | $response = $this->handleResponse($responseRaw); |
95 | 94 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\HttpClient; |
5 | 5 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | foreach ($options as $option => $value) |
63 | 63 | { |
64 | - if (! in_array($option, static::$possibleOptions, true)) { |
|
64 | + if (!in_array($option, static::$possibleOptions, true)) { |
|
65 | 65 | throw new InvalidOptionException($option, static::$possibleOptions); |
66 | 66 | } |
67 | 67 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $decoded = json_decode($content); |
157 | 157 | |
158 | 158 | if (json_last_error() !== JSON_ERROR_NONE) { |
159 | - throw new \RuntimeException('Decoding error: "' . json_last_error_msg() . '""'); |
|
159 | + throw new \RuntimeException('Decoding error: "'.json_last_error_msg().'""'); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | return $this->hydrator->hydrate($decoded); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $encoded = json_encode($document->toArray()); |
174 | 174 | |
175 | 175 | if (json_last_error() !== JSON_ERROR_NONE) { |
176 | - throw new \RuntimeException('Encoding error: "' . json_last_error_msg() . '""'); |
|
176 | + throw new \RuntimeException('Encoding error: "'.json_last_error_msg().'""'); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | $stream = fopen('php://memory', 'r+'); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\Document; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\Document; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\Document\Behaviour; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\Document\Behaviour; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\Document\Behaviour; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Mikemirten\Component\JsonApi\Document\Behaviour; |
5 | 5 |