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