1 | <?php |
||
17 | class ClonerOptions extends AbstractOptions |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var string создаваемый класс клонера |
||
22 | */ |
||
23 | protected $class; |
||
24 | |||
25 | /** |
||
26 | * @var Cloner\RelationOptions[] |
||
27 | */ |
||
28 | protected $relations = []; |
||
29 | |||
30 | /** |
||
31 | * @return string |
||
32 | */ |
||
33 | public function getClass() |
||
37 | |||
38 | /** |
||
39 | * @param string $class |
||
40 | * |
||
41 | * @return $this |
||
42 | */ |
||
43 | public function setClass($class) |
||
48 | |||
49 | /** |
||
50 | * @return Cloner\RelationOptions[] |
||
51 | */ |
||
52 | public function getRelations() |
||
56 | |||
57 | /** |
||
58 | * @param Cloner\RelationOptions[] $relations |
||
59 | * |
||
60 | * @return $this |
||
61 | */ |
||
62 | public function setRelations($relations) |
||
69 | } |
||
70 |
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.