| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 2 | protected function handleForManager( |
|
| 15 | EntityManagerInterface $entityManager, |
||
| 16 | Envelope $envelope, |
||
| 17 | StackInterface $stack |
||
| 18 | ): Envelope { |
||
| 19 | try { |
||
| 20 | 2 | $connection = $entityManager->getConnection(); |
|
| 21 | |||
| 22 | 2 | return $stack->next()->handle($envelope, $stack); |
|
| 23 | } finally { |
||
| 24 | 2 | if (null !== $envelope->last(ReceivedStamp::class)) { |
|
| 25 | 2 | $connection->close(); |
|
| 26 | } |
||
| 30 |