diff --git a/src/OAuth2/Response.php b/src/OAuth2/Response.php index 88c1ad5f..74653d14 100644 --- a/src/OAuth2/Response.php +++ b/src/OAuth2/Response.php @@ -144,7 +144,7 @@ public function getStatusCode() * @param string $text * @throws InvalidArgumentException */ - public function setStatusCode($statusCode, $text = null) + public function setStatusCode(int $statusCode, ?string $text = null): static { $this->statusCode = (int) $statusCode; if ($this->isInvalid()) { diff --git a/src/OAuth2/ResponseInterface.php b/src/OAuth2/ResponseInterface.php index fe920864..4e0d847c 100644 --- a/src/OAuth2/ResponseInterface.php +++ b/src/OAuth2/ResponseInterface.php @@ -23,7 +23,7 @@ public function addHttpHeaders(array $httpHeaders); /** * @param int $statusCode */ - public function setStatusCode($statusCode); + public function setStatusCode(int $statusCode, ?string $text = null): static; /** * @param int $statusCode