Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 0 |
1 | <?php |
||
43 | 37 | final protected function getAnnotationReader(): Reader |
|
44 | { |
||
45 | 37 | $driver = $this->entityManager->getConfiguration()->getMetadataDriverImpl(); |
|
46 | 37 | if ($driver instanceof AnnotationDriver) { |
|
47 | 34 | return $driver->getReader(); |
|
48 | 3 | } else if ($driver instanceof MappingDriverChain) { |
|
49 | 3 | return new MappingDriverChainAdapter($driver); |
|
50 | } else { |
||
51 | throw new Exception('graphql-doctrine requires Doctrine to be configured with a `' . AnnotationDriver::class . '`.'); |
||
52 | } |
||
55 |