Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function execute($command, callable $next) |
||
44 | { |
||
45 | try { |
||
46 | $next($command); |
||
47 | } catch (\Exception $exception) { |
||
48 | $this->eventRecorder->eraseEvents(); |
||
49 | |||
50 | throw $exception; |
||
51 | } |
||
52 | |||
53 | $recordedEvents = $this->eventRecorder->releaseEvents(); |
||
54 | |||
55 | foreach ($recordedEvents as $event) { |
||
56 | $this->eventDispatcher->dispatch($event); |
||
57 | } |
||
58 | } |
||
59 | } |