|
|
@@ -44,9 +44,9 @@ class Response implements ResponseInterface
|
|
|
{
|
|
|
use MessageTrait;
|
|
|
|
|
|
- public const MIN_STATUS_CODE_VALUE = 100;
|
|
|
+ public const STATUS_CODE_MIN = 100;
|
|
|
|
|
|
- public const MAX_STATUS_CODE_VALUE = 599;
|
|
|
+ public const STATUS_CODE_MAX = 599;
|
|
|
|
|
|
/**
|
|
|
* Allowed HTTP status codes and their default description.
|
|
|
@@ -623,7 +623,7 @@ class Response implements ResponseInterface
|
|
|
*/
|
|
|
protected function _setStatus(int $code, string $reasonPhrase = ''): void
|
|
|
{
|
|
|
- if ($code < static::MIN_STATUS_CODE_VALUE || $code > static::MAX_STATUS_CODE_VALUE) {
|
|
|
+ if ($code < static::STATUS_CODE_MIN || $code > static::STATUS_CODE_MAX) {
|
|
|
throw new InvalidArgumentException(sprintf(
|
|
|
'Invalid status code: %s. Use a valid HTTP status code in range 1xx - 5xx.',
|
|
|
$code
|