Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function __invoke(array $arguments = []) : Response |
||
29 | { |
||
30 | // default argument / when not specified from the route |
||
31 | $id = 42324234234; |
||
32 | |||
33 | // if (!empty($arguments['id'])) {} |
||
34 | if (!isset($arguments['id'])) { |
||
35 | $arguments['id'] = $id; |
||
36 | } |
||
37 | |||
38 | // new domain |
||
39 | $domain = new HomeDomainPayloadTwo($arguments); |
||
40 | $payload = $domain->getWelcomePayload($arguments['id']); |
||
|
|||
41 | |||
42 | // set route arguments for domain |
||
43 | // $payload->setArguments($arguments['id']); |
||
44 | |||
45 | // Set Payload responder |
||
46 | $this->setResponder(new PayloadResponder($this->config)); |
||
47 | $responder = $this->responder->__invoke($payload); |
||
48 | |||
49 | return $responder; |
||
50 | } |
||
52 |
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.