| 1 | <?php |
||
| 17 | class ClonerOptions extends AbstractOptions |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var Cloner\RelationOptions[] |
||
| 21 | */ |
||
| 22 | protected $relations = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return Cloner\RelationOptions[] |
||
| 26 | */ |
||
| 27 | public function getRelations() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param Cloner\RelationOptions[] $relations |
||
| 34 | * |
||
| 35 | * @return $this |
||
| 36 | */ |
||
| 37 | public function setRelations($relations) |
||
| 44 | } |
||
| 45 |
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
@ignorePhpDoc annotation to the duplicate definition and it will be ignored.