1 | <?php |
||
20 | class Title implements Contract |
||
21 | { |
||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function getName() |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function find(Dom $dom) |
||
37 | |||
38 | /** |
||
39 | * Truncates the tile to 10 chars. |
||
40 | * |
||
41 | * @param $title |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | private function truncate($title) |
||
53 | } |
||
54 |
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.