1 | <?php |
||
10 | class Response |
||
11 | { |
||
12 | /** |
||
13 | * Returns a response with a particular view loaded. |
||
14 | * |
||
15 | * @param string $view name of the view to load |
||
16 | * @param array $data data to expose to the view |
||
17 | * @return \Psr\Http\Message\ResponseInterface |
||
18 | */ |
||
19 | public static function view($view, $data) |
||
23 | |||
24 | /** |
||
25 | * Returns a response with a particular view loaded. |
||
26 | * |
||
27 | * @param string $view name of the view to load |
||
|
|||
28 | * @param array $data data to expose to the view |
||
29 | * @return \Psr\Http\Message\ResponseInterface |
||
30 | */ |
||
31 | 3 | public static function json($data, $flags = 79) |
|
35 | |||
36 | /** |
||
37 | * Create a new basic string response. |
||
38 | * |
||
39 | * @param string $name name of the view to load |
||
40 | * @return \Psr\Http\Message\ResponseInterface |
||
41 | */ |
||
42 | 4 | public static function string($string) |
|
46 | |||
47 | /** |
||
48 | * Respond with a 400 bad request error json message. |
||
49 | * |
||
50 | * @return \Psr\Http\Message\ResponseInterface |
||
51 | */ |
||
52 | 1 | public static function error400(RequestInterface $request) |
|
56 | |||
57 | /** |
||
58 | * Respond with a 403 error message. |
||
59 | * |
||
60 | * @return \Psr\Http\Message\ResponseInterface |
||
61 | */ |
||
62 | 1 | public static function error403(RequestInterface $request) |
|
66 | |||
67 | /** |
||
68 | * Respond with a 404 error message. |
||
69 | * |
||
70 | * @return \Psr\Http\Message\ResponseInterface |
||
71 | */ |
||
72 | 1 | public static function error404(RequestInterface $request) |
|
76 | |||
77 | /** |
||
78 | * Respond with a 405 error message. |
||
79 | * |
||
80 | * @return \Psr\Http\Message\ResponseInterface |
||
81 | */ |
||
82 | 1 | public static function error405(RequestInterface $request) |
|
86 | |||
87 | /** |
||
88 | * Respond with a 429 error message. |
||
89 | * |
||
90 | * @return \Psr\Http\Message\ResponseInterface |
||
91 | */ |
||
92 | 1 | public static function error429(RequestInterface $request) |
|
96 | } |
||
97 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.