Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | 13 | public function getMetadata(): array |
|
39 | { |
||
40 | 13 | return array_merge( |
|
41 | 13 | $this->message->getMetadata(), |
|
42 | 13 | [ |
|
43 | 13 | self::ENVELOPE_STACK_KEY => array_merge( |
|
44 | 13 | $this->message->getMetadata()[self::ENVELOPE_STACK_KEY] ?? [], |
|
45 | 13 | [self::class], |
|
46 | 13 | ), |
|
47 | 13 | ], |
|
48 | 13 | $this->getEnvelopeMetadata(), |
|
49 | 13 | ); |
|
73 |
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. Please note the @ignore annotation hint above.