@@ -2,22 +2,14 @@ |
||
| 2 | 2 | namespace Behapi\Http; |
| 3 | 3 | |
| 4 | 4 | use RuntimeException; |
| 5 | - |
|
| 6 | 5 | use Psr\Http\Message\RequestInterface; |
| 7 | - |
|
| 8 | 6 | use Behat\Gherkin\Node\TableNode; |
| 9 | 7 | use Behat\Behat\Context\Context as BehatContext; |
| 10 | - |
|
| 11 | 8 | use Http\Client\HttpClient; |
| 12 | 9 | use Http\Message\StreamFactory; |
| 13 | 10 | use Http\Message\MessageFactory; |
| 14 | 11 | use Http\Discovery\HttpClientDiscovery; |
| 15 | - |
|
| 16 | 12 | use Webmozart\Assert\Assert; |
| 17 | - |
|
| 18 | -use Behapi\EventListener\Events; |
|
| 19 | -use Behapi\EventListener\RequestEvent; |
|
| 20 | - |
|
| 21 | 13 | use Behapi\HttpHistory\History as HttpHistory; |
| 22 | 14 | |
| 23 | 15 | use function trim; |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | namespace Behapi\Json; |
| 3 | 3 | |
| 4 | 4 | use stdClass; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | { |
| 52 | 52 | $this->getJson(); |
| 53 | 53 | |
| 54 | - [$contentType,] = explode(';', $this->getResponse()->getHeaderLine('Content-Type'), 2); |
|
| 54 | + [$contentType, ] = explode(';', $this->getResponse()->getHeaderLine('Content-Type'), 2); |
|
| 55 | 55 | |
| 56 | 56 | Assert::same(JSON_ERROR_NONE, json_last_error(), sprintf('The response is not a valid json (%s)', json_last_error_msg())); |
| 57 | 57 | Assert::oneOf($contentType, $this->getContentTypes(), 'The response should have a valid content-type (expected one of %2$s, got %1$s)'); |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | namespace Behapi\Http; |
| 3 | 3 | |
| 4 | 4 | trait Builder |