| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 9 | public function commitTransaction(): bool |
|
| 25 | { |
||
| 26 | 9 | $nestingLevel = $this->entityManager->getConnection()->getTransactionNestingLevel(); |
|
| 27 | 9 | $flush = false; |
|
| 28 | 9 | if (1 === $nestingLevel) { |
|
| 29 | 9 | $flush = true; |
|
| 30 | 9 | $this->entityManager->flush(); |
|
| 31 | } |
||
| 32 | 9 | $this->entityManager->commit(); |
|
| 33 | |||
| 34 | 9 | return $flush; |
|
| 35 | } |
||
| 36 | |||
| 76 |