| Conditions | 3 |
| Paths | 7 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 36 | public function execute($command, callable $next) |
||
| 37 | { |
||
| 38 | $this->entityManager->beginTransaction(); |
||
| 39 | |||
| 40 | try { |
||
| 41 | $returnValue = $next($command); |
||
| 42 | |||
| 43 | $this->entityManager->flush(); |
||
| 44 | $this->entityManager->commit(); |
||
| 45 | } catch (Exception $e) { |
||
| 46 | $this->rollbackTransaction(); |
||
| 47 | |||
| 48 | throw $e; |
||
| 49 | } catch (Throwable $e) { |
||
|
|
|||
| 50 | $this->rollbackTransaction(); |
||
| 51 | |||
| 52 | throw $e; |
||
| 53 | } |
||
| 54 | |||
| 55 | return $returnValue; |
||
| 56 | } |
||
| 57 | |||
| 71 |