Total Complexity | 2 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
31 | class ArgumentNode extends DefinitionNode |
||
32 | { |
||
33 | /** |
||
34 | * @var Identifier |
||
35 | */ |
||
36 | public Identifier $name; |
||
37 | |||
38 | /** |
||
39 | * @var ValueInterface |
||
40 | */ |
||
41 | public ValueInterface $value; |
||
42 | |||
43 | /** |
||
44 | * ArgumentNode constructor. |
||
45 | * |
||
46 | * @param Identifier $name |
||
47 | * @param ValueInterface $value |
||
48 | */ |
||
49 | public function __construct(Identifier $name, ValueInterface $value) |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param array|Node[] $children |
||
57 | * @return static |
||
58 | */ |
||
59 | public static function create(array $children): self |
||
64 |
This check compares calls to functions or methods with their respective definitions. If the call has less 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. Please note the @ignore annotation hint above.