Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
phpstan fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbannert committed Jul 31, 2018
1 parent 9f50f70 commit a2214d2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Contract/Exception/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
declare(strict_types=1);
namespace Narrowspark\HttpStatus\Contract\Exception;

interface Exception
interface Exception extends \Throwable
{
}
2 changes: 1 addition & 1 deletion src/Contract/Exception/HttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function getStatusCode(): int;
/**
* Returns response headers.
*
* @return array Response headers
* @return string[] Response headers
*/
public function getHeaders(): array;
}
2 changes: 1 addition & 1 deletion src/Exception/AbstractClientErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getHeaders(): array
/**
* Set response headers.
*
* @param array $headers Response headers
* @param string[] $headers Response headers
*
* @return void
*
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/AbstractServerErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getHeaders(): array
/**
* Set response headers.
*
* @param array $headers Response headers
* @param string[] $headers Response headers
*
* @return void
*
Expand Down
4 changes: 2 additions & 2 deletions src/HttpStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ public static function getReasonPhrase(int $code): string
* @throws \Narrowspark\HttpStatus\Exception\PreconditionRequiredException
* @throws \Narrowspark\HttpStatus\Exception\ProxyAuthenticationRequiredException
* @throws \Narrowspark\HttpStatus\Exception\RequestedRangeNotSatisfiableException
* @throws \Narrowspark\HttpStatus\Exception\RequestEntityTooLargeException
* @throws \Narrowspark\HttpStatus\Exception\RequestHeaderFieldsTooLargeException
* @throws \Narrowspark\HttpStatus\Exception\RequestTimeoutException
* @throws \Narrowspark\HttpStatus\Exception\RequestUriTooLongException
* @throws \Narrowspark\HttpStatus\Exception\ServiceUnavailableException
* @throws \Narrowspark\HttpStatus\Exception\TooEarlyException
* @throws \Narrowspark\HttpStatus\Exception\TooManyRequestsException
* @throws \Narrowspark\HttpStatus\Exception\UnauthorizedException
* @throws \Narrowspark\HttpStatus\Exception\UnavailableForLegalReasonsException
Expand Down Expand Up @@ -375,7 +375,7 @@ public static function filterStatusCode(int $code): int
'max_range' => self::MAXIMUM,
]]);

if (! $filteredCode) {
if ($filteredCode === false) {
throw new InvalidArgumentException(\sprintf(
'The submitted code "%s" must be a positive integer between %s and %s.',
$code,
Expand Down

0 comments on commit a2214d2

Please sign in to comment.