| Conditions | 4 |
| Paths | 27 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | public function serve(Worker $worker, callable $finalize = null): void |
||
| 39 | { |
||
| 40 | while ($body = $worker->receive($context)) { |
||
| 41 | try { |
||
| 42 | $context = json_decode($context, true); |
||
| 43 | $handler = $this->registry->getHandler($context['job']); |
||
| 44 | |||
| 45 | $handler->handle($context['job'], $context['id'], $body); |
||
| 46 | |||
| 47 | $worker->send('ok'); |
||
| 48 | } catch (\Throwable $e) { |
||
| 49 | $worker->error((string)$e->getMessage()); |
||
| 50 | } finally { |
||
| 51 | if ($finalize !== null) { |
||
| 52 | call_user_func($finalize, $e ?? null); |
||
| 53 | } |
||
| 58 |
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.