1 | <?php |
||
16 | { |
||
17 | /** |
||
18 | * @param string $packageRoot |
||
19 | * @param Request $request |
||
20 | */ |
||
21 | public function __construct($packageRoot, Request $request) |
||
27 | |||
28 | /** |
||
29 | * @return Response|null |
||
30 | */ |
||
31 | public function getResponse() |
||
35 | |||
36 | /** |
||
37 | * @param Response $response |
||
38 | */ |
||
39 | public function setResponse(Response $response) |
||
43 | |||
44 | /** |
||
45 | * Create Response from template. |
||
46 | * |
||
47 | * @param string $name |
||
48 | * @param array $data |
||
49 | */ |
||
50 | public function setView($name = '', array $data = []) |
||
55 | |||
56 | /** |
||
57 | * Create Response from content. |
||
58 | * |
||
59 | * @param string $content |
||
60 | */ |
||
61 | public function setContent($content) |
||
66 | |||
67 | /** |
||
68 | * Redirect to the URL with statusCode. |
||
69 | * |
||
70 | * @param null $url |
||
71 | * @param int $statusCode |
||
72 | */ |
||
73 | public function setRedirect($url = null, $statusCode = 303) |
||
78 | |||
79 | private $packageRoot; |
||
80 | private $request; |
||
81 | private $response; |
||
82 | } |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.