| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 30 | 22 | public function __construct(EntityManager $entityManager, Connection $connection = null) |
|
| 31 | { |
||
| 32 | 22 | $this->entityManager = $entityManager; |
|
| 33 | 22 | $this->metaData = $this->entityManager->getMetaData($this->getEntityClass()); |
|
| 34 | 22 | $this->hydrator = $this->entityManager->getHydrator($this->getEntityClass()); |
|
| 35 | 22 | if ($connection === null) { |
|
| 36 | 22 | $connection = ConnectionManager::get($this->metaData->getConnection()); |
|
| 37 | } |
||
| 38 | 22 | $this->connection = $connection; |
|
| 39 | 22 | } |
|
| 41 |