Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"guzzlehttp/guzzle": "^6.3",
"slim/slim": "^3.12",
"friendsofphp/php-cs-fixer": "^2.16",
"sensiolabs/security-checker": "^6.0"
"sensiolabs/security-checker": "^6.0",
"symfony/http-foundation": "^5.0"
},
"require-dev": {
"internations/testing-component": "1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function start(callable $callback = null, array $env = [])
$this->pollWait();
}

public function stop($timeout = 10, int $signal = null)
public function stop($timeout = 10, $signal = null)
{
return parent::stop($timeout, $signal);
}
Expand Down
7 changes: 4 additions & 3 deletions src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace InterNations\Component\HttpMock;

use function GuzzleHttp\Psr7\parse_response;
use function GuzzleHttp\Psr7\str;
use UnexpectedValueException;

final class Util
Expand All @@ -26,12 +28,11 @@ public static function silentDeserialize($string)

public static function responseDeserialize($string)
{
return \GuzzleHttp\Psr7\parse_response($string);
return parse_response($string);
}

public static function serializePsrMessage($message)
{
$fixedHeaders = [];
$headers = $message->getHeaders();
foreach ($headers as $key => $list) {
foreach ($list as $value) {
Expand All @@ -46,6 +47,6 @@ public static function serializePsrMessage($message)
}
}

return \GuzzleHttp\Psr7\str($message);
return str($message);
}
}