| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | private static function sendResponse(array $methodCalls, $func) |
||
| 37 | { |
||
| 38 | 12 | return function () use ($func, $methodCalls) { |
|
| 39 | 9 | $respObj = $func(); |
|
| 40 | 9 | foreach ($methodCalls as $call) { |
|
| 41 | 9 | [$method, $args] = $call; |
|
| 42 | 9 | $respObj = $respObj->{$method}(...$args); |
|
| 43 | } |
||
| 44 | |||
| 45 | 9 | throw new HttpResponseException($respObj); |
|
| 46 | 12 | }; |
|
| 49 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.