1 | <?php |
||
12 | class TableCaption extends Tag implements PartInterface |
||
13 | { |
||
14 | use PartTrait { |
||
15 | PartTrait::attachToCompound as private attachToCompoundInternal; |
||
16 | } |
||
17 | |||
18 | const ID = 'caption'; |
||
19 | |||
20 | /** @var DataView */ |
||
21 | private $text; |
||
22 | |||
23 | public function __construct($text, $attributes = []) |
||
30 | |||
31 | public function attachToCompound(Compound $root, $prepend = true) |
||
35 | |||
36 | /** |
||
37 | * @return string |
||
38 | */ |
||
39 | public function getText() |
||
43 | |||
44 | /** |
||
45 | * @param string $text |
||
46 | */ |
||
47 | public function setText($text) |
||
51 | } |
||
52 |
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.