Skip to content

Commit 7a72fa9

Browse files
authored
Merge pull request #203 from JanPetterMG/patch-1
Response constructor phpdoc + minor improvements
2 parents dfd621e + 1c79b98 commit 7a72fa9

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/Http/AbstractResponse.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(Url $startingUrl, Url $url, $statusCode, $contentTyp
1818
{
1919
$this->startingUrl = $startingUrl;
2020
$this->url = $url;
21-
$this->statusCode = $statusCode;
21+
$this->statusCode = (int)$statusCode;
2222
$this->contentType = $contentType;
2323
$this->headers = $headers;
2424
$this->info = $info;

src/Http/Response.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,18 @@ class Response extends AbstractResponse
1717
protected $jsonContent;
1818
protected $htmlContent;
1919

20-
public function __construct(Url $startingUrl, Url $url, $statusCode, $contentType, $content, array $headers, array $info)
20+
/**
21+
* Response constructor.
22+
*
23+
* @param Url $startingUrl
24+
* @param Url $url
25+
* @param int $statusCode
26+
* @param string|null $contentType
27+
* @param string $content
28+
* @param array $headers
29+
* @param array $info
30+
*/
31+
public function __construct(Url $startingUrl, Url $url, $statusCode, $contentType, $content, array $headers, array $info = [])
2132
{
2233
parent::__construct($startingUrl, $url, $statusCode, $contentType, $headers, $info);
2334
$this->setContent($content);

0 commit comments

Comments
 (0)