kodedphp /
http
| 1 | <?php declare(strict_types=1); |
||||
| 2 | |||||
| 3 | namespace Koded\Http; |
||||
| 4 | |||||
| 5 | use Koded\Http\Interfaces\HttpStatus; |
||||
| 6 | use function array_map; |
||||
| 7 | use function implode; |
||||
| 8 | |||||
| 9 | class HTTPNotFound extends HTTPError |
||||
| 10 | { |
||||
| 11 | public function __construct(...$args) |
||||
| 12 | { |
||||
| 13 | parent::__construct(HttpStatus::NOT_FOUND, ...$args); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 14 | } |
||||
| 15 | } |
||||
| 16 | |||||
| 17 | class HTTPBadRequest extends HTTPError |
||||
| 18 | { |
||||
| 19 | public function __construct(...$args) |
||||
| 20 | { |
||||
| 21 | parent::__construct(HttpStatus::BAD_REQUEST, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 22 | } |
||||
| 23 | } |
||||
| 24 | |||||
| 25 | class HTTPMethodNotAllowed extends HTTPError |
||||
| 26 | { |
||||
| 27 | public function __construct(array $allowed, ...$args) |
||||
| 28 | { |
||||
| 29 | $args['headers']['Allow'] = implode(', ', array_map('strtoupper', $allowed)); |
||||
| 30 | parent::__construct(HttpStatus::METHOD_NOT_ALLOWED, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 31 | } |
||||
| 32 | } |
||||
| 33 | |||||
| 34 | class HTTPConflict extends HTTPError |
||||
| 35 | { |
||||
| 36 | public function __construct(...$args) |
||||
| 37 | { |
||||
| 38 | parent::__construct(HttpStatus::CONFLICT, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 39 | } |
||||
| 40 | } |
||||
| 41 | |||||
| 42 | class HTTPServiceNotFound extends HTTPError |
||||
| 43 | { |
||||
| 44 | public function __construct(...$args) |
||||
| 45 | { |
||||
| 46 | parent::__construct(HttpStatus::SERVICE_NOT_FOUND, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 47 | } |
||||
| 48 | } |
||||
| 49 | |||||
| 50 | class HTTPUnsupportedMediaType extends HTTPError |
||||
| 51 | { |
||||
| 52 | public function __construct(...$args) |
||||
| 53 | { |
||||
| 54 | parent::__construct(HttpStatus::UNSUPPORTED_MEDIA_TYPE, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 55 | } |
||||
| 56 | } |
||||
| 57 | |||||
| 58 | class HTTPUnprocessableEntity extends HTTPError |
||||
| 59 | { |
||||
| 60 | public function __construct(...$args) |
||||
| 61 | { |
||||
| 62 | parent::__construct(HttpStatus::UNPROCESSABLE_ENTITY, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 63 | } |
||||
| 64 | } |
||||
| 65 | |||||
| 66 | class HTTPFailedDependency extends HTTPError |
||||
| 67 | { |
||||
| 68 | public function __construct(...$args) |
||||
| 69 | { |
||||
| 70 | parent::__construct(HttpStatus::FAILED_DEPENDENCY, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 71 | } |
||||
| 72 | } |
||||
| 73 | |||||
| 74 | class HTTPUnauthorized extends HTTPError |
||||
| 75 | { |
||||
| 76 | public function __construct(...$args) |
||||
| 77 | { |
||||
| 78 | parent::__construct(HttpStatus::UNAUTHORIZED, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 79 | } |
||||
| 80 | } |
||||
| 81 | |||||
| 82 | class HTTPForbidden extends HTTPError |
||||
| 83 | { |
||||
| 84 | public function __construct(...$args) |
||||
| 85 | { |
||||
| 86 | parent::__construct(HttpStatus::FORBIDDEN, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 87 | } |
||||
| 88 | } |
||||
| 89 | |||||
| 90 | class HTTPNotImplemented extends HTTPError |
||||
| 91 | { |
||||
| 92 | public function __construct(...$args) |
||||
| 93 | { |
||||
| 94 | parent::__construct(HttpStatus::NOT_IMPLEMENTED, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 95 | } |
||||
| 96 | } |
||||
| 97 | |||||
| 98 | class HTTPServerError extends HTTPError |
||||
| 99 | { |
||||
| 100 | public function __construct(...$args) |
||||
| 101 | { |
||||
| 102 | parent::__construct(HttpStatus::INTERNAL_SERVER_ERROR, ...$args); |
||||
|
0 ignored issues
–
show
$args is expanded, but the parameter $title of Koded\Http\HTTPError::__construct() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 103 | } |
||||
| 104 | } |
||||
| 105 |