Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
45 | public function execute(Command $command) |
||
46 | { |
||
47 | if (!$this->innerCommandBus) { |
||
48 | throw new Exception('No inner bus defined for this decorator. Set an inner bus with setInnerBus()'); |
||
49 | } |
||
50 | |||
51 | $response = $this->innerCommandBus->execute($command); |
||
52 | |||
53 | $eventName = $this->getEventName($command); |
||
54 | |||
55 | $this->dispatcher->dispatch($eventName, [$command]); |
||
56 | |||
57 | return $response; |
||
58 | } |
||
59 | |||
71 |