1 | <?php |
||
13 | class Index extends LuceneIndex |
||
14 | { |
||
15 | /** |
||
16 | * Index constructor. |
||
17 | * @param Repository $config |
||
18 | */ |
||
19 | 21 | public function __construct(Filter $filter, Repository $config, Filesystem $filesystem) |
|
26 | |||
27 | /** |
||
28 | * @param array $filters |
||
29 | */ |
||
30 | 21 | private function addFilters(array $filters = [], Filesystem $filesystem) |
|
36 | |||
37 | /** |
||
38 | * @param $switch |
||
39 | * @param $filter |
||
40 | * @param Filesystem $filesystem |
||
41 | */ |
||
42 | 21 | private function handleFilter($switch, $filter, Filesystem $filesystem) |
|
48 | |||
49 | /** |
||
50 | * @param $filter |
||
51 | * @param $switch |
||
52 | */ |
||
53 | private function filter($filter, $switch) |
||
57 | |||
58 | /** |
||
59 | * @param $switch |
||
60 | * @param Filesystem $filesystem |
||
61 | */ |
||
62 | private function stopWordFilter($switch, Filesystem $filesystem) |
||
66 | } |
||
67 |
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.