diff --git a/src/Http/AbstractResponse.php b/src/Http/AbstractResponse.php index 6b13c4c2..bca88b6f 100644 --- a/src/Http/AbstractResponse.php +++ b/src/Http/AbstractResponse.php @@ -18,7 +18,7 @@ public function __construct(Url $startingUrl, Url $url, $statusCode, $contentTyp { $this->startingUrl = $startingUrl; $this->url = $url; - $this->statusCode = $statusCode; + $this->statusCode = (int)$statusCode; $this->contentType = $contentType; $this->headers = $headers; $this->info = $info; diff --git a/src/Http/Response.php b/src/Http/Response.php index f790171d..bbe5c04b 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -17,7 +17,18 @@ class Response extends AbstractResponse protected $jsonContent; protected $htmlContent; - public function __construct(Url $startingUrl, Url $url, $statusCode, $contentType, $content, array $headers, array $info) + /** + * Response constructor. + * + * @param Url $startingUrl + * @param Url $url + * @param int $statusCode + * @param string|null $contentType + * @param string $content + * @param array $headers + * @param array $info + */ + public function __construct(Url $startingUrl, Url $url, $statusCode, $contentType, $content, array $headers, array $info = []) { parent::__construct($startingUrl, $url, $statusCode, $contentType, $headers, $info); $this->setContent($content);