| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 2 | private function pingConnection(EntityManagerInterface $entityManager): void |
|
| 36 | 2 | { |
|
| 37 | $connection = $entityManager->getConnection(); |
||
| 38 | 2 | ||
| 39 | try { |
||
| 40 | $connection->executeQuery($this->query); |
||
| 41 | } catch (\Throwable $exception) { |
||
| 42 | $connection->close(); |
||
| 43 | } |
||
| 44 | |||
| 45 | if (! $entityManager->isOpen()) { |
||
| 46 | $this->managerRegistry->resetManager($this->entityManagerName); |
||
| 47 | } |
||
| 50 |