1 | <?php |
||
11 | class ParameterMapper |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var Request |
||
16 | */ |
||
17 | private $request; |
||
18 | |||
19 | /** |
||
20 | * @var ViewModel |
||
21 | */ |
||
22 | private $viewModel; |
||
23 | |||
24 | /** |
||
25 | * @var Map |
||
26 | */ |
||
27 | private $routerMap; |
||
28 | |||
29 | /** |
||
30 | * @var ParameterMap |
||
31 | */ |
||
32 | private $parameterMap; |
||
33 | |||
34 | |||
35 | public function setRequest(Request $request) |
||
39 | |||
40 | public function setViewModel(ViewModel $viewModel) |
||
44 | |||
45 | public function setRouterMap(Map $routerMap) |
||
49 | |||
50 | /** |
||
51 | * @return ParameterMap |
||
52 | */ |
||
53 | public function getParameterMap() |
||
62 | |||
63 | private function bindUrl() |
||
72 | |||
73 | private function bindViewModel() |
||
77 | |||
78 | |||
79 | private function resolveUrl() |
||
84 | } |
||
85 |
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.