| Conditions | 5 |
| Paths | 12 |
| Total Lines | 26 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function handle($message, callable $next) |
||
| 29 | { |
||
| 30 | $this->ensureTypeOfMessage($message); |
||
| 31 | |||
| 32 | try { |
||
| 33 | $handler = $this->handlerClassResolver->resolve($message); |
||
| 34 | $metadata = Validator::getMetadataForClass(get_class($message)); |
||
|
|
|||
| 35 | $classMetadata = null; |
||
| 36 | |||
| 37 | if ($metadata !== null) { |
||
| 38 | /** @var ClassMetadata $classMetadata */ |
||
| 39 | $classMetadata = $metadata->getRootClassMetadata(); |
||
| 40 | } |
||
| 41 | |||
| 42 | $handler($message, $classMetadata); |
||
| 43 | } catch (NotFoundException $e) { |
||
| 44 | // NotFoundException::handlerMethodNameForObject |
||
| 45 | // NotFoundException::methodForObject |
||
| 46 | if ($e->getCode() == 3 || $e->getCode() == 7) { |
||
| 47 | throw $e; |
||
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | Validator::assert($message); |
||
| 52 | $next($message); |
||
| 53 | } |
||
| 54 | } |
||
| 55 |
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.