|
9 | 9 | */ |
10 | 10 | class Error extends AbstractError |
11 | 11 | { |
12 | | - public static function error(string $title, int $httpCode): self |
| 12 | + /** |
| 13 | + * @return static |
| 14 | + */ |
| 15 | + public static function error(string $title, int $httpCode) |
13 | 16 | { |
14 | | - return new self($title, $httpCode); |
| 17 | + return new static($title, $httpCode); |
15 | 18 | } |
16 | 19 |
|
17 | | - public static function serverError(string $title = 'Internal server error'): self |
| 20 | + /** |
| 21 | + * @return static |
| 22 | + */ |
| 23 | + public static function serverError(string $title = 'Internal server error') |
18 | 24 | { |
19 | | - return new self($title, 500); |
| 25 | + return new static($title, 500); |
20 | 26 | } |
21 | 27 |
|
22 | | - public static function forbidden(string $title = 'Forbidden'): self |
| 28 | + /** |
| 29 | + * @return static |
| 30 | + */ |
| 31 | + public static function forbidden(string $title = 'Forbidden') |
23 | 32 | { |
24 | | - return new self($title, 403); |
| 33 | + return new static($title, 403); |
25 | 34 | } |
26 | 35 |
|
27 | | - public static function notFound(string $title = 'Not Found'): self |
| 36 | + /** |
| 37 | + * @return static |
| 38 | + */ |
| 39 | + public static function notFound(string $title = 'Not Found') |
28 | 40 | { |
29 | | - return new self($title, 404); |
| 41 | + return new static($title, 404); |
30 | 42 | } |
31 | 43 |
|
32 | | - public static function unauthorized(string $title = 'Unauthorized'): self |
| 44 | + /** |
| 45 | + * @return static |
| 46 | + */ |
| 47 | + public static function unauthorized(string $title = 'Unauthorized') |
33 | 48 | { |
34 | | - return new self($title, 401); |
| 49 | + return new static($title, 401); |
35 | 50 | } |
36 | 51 |
|
37 | | - public static function invalid(string $title = 'Bad Request'): self |
| 52 | + /** |
| 53 | + * @return static |
| 54 | + */ |
| 55 | + public static function invalid(string $title = 'Bad Request') |
38 | 56 | { |
39 | | - return new self($title, 400); |
| 57 | + return new static($title, 400); |
40 | 58 | } |
41 | 59 | } |
0 commit comments