| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | private function getEntityManager(object $data): EntityManagerInterface |
||
| 45 | { |
||
| 46 | /** @var EntityManagerInterface|null $em */ |
||
| 47 | $em = $this->registry->getManagerForClass($this->getObjectClass($data)); |
||
| 48 | if (!$em) { |
||
| 49 | throw ORMInvalidArgumentException::invalidObject(__CLASS__ . '::' . __FUNCTION__, $data); |
||
| 50 | } |
||
| 51 | |||
| 52 | return $em; |
||
| 53 | } |
||
| 55 |