| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function __invoke(Command $command, callable $next = null) |
||
| 34 | { |
||
| 35 | $handlerName = $this->commandTranslator->handlerName($command); |
||
| 36 | |||
| 37 | /** @var $handlerInstance CommandHandler */ |
||
| 38 | $handlerInstance = $this->handlerResolver->instantiate($handlerName); |
||
| 39 | $handlerInstance($command); |
||
| 40 | |||
| 41 | if ($next) { |
||
| 42 | $next($command); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |
||
| 46 |