| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 3 | public function execute($command, callable $next) |
|
| 25 | { |
||
| 26 | 3 | if (!$command instanceof SelfExecutingCommand) { |
|
| 27 | 1 | return $next($command); |
|
| 28 | } |
||
| 29 | 2 | if (!method_exists($command, 'handle')) { |
|
| 30 | 1 | throw new CommandHasNoHandleMethodException('Command does not have handle method'); |
|
| 31 | } |
||
| 32 | 1 | return $command->handle(); |
|
|
|
|||
| 33 | } |
||
| 34 | } |
||
| 35 |
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.