Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function parse($string) |
||
23 | { |
||
24 | if (isset($this->cache[$string])) { |
||
25 | return $this->cache[$string]; |
||
26 | } |
||
27 | |||
28 | $this->cache[$string] = array_map(function ($rule) { |
||
29 | return $this->rules->make(...$this->getNameAndArguments($rule)); |
||
|
|||
30 | }, explode('|', $string)); |
||
31 | |||
32 | return $this->cache[$string]; |
||
33 | } |
||
56 |
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.