| Conditions | 3 |
| Paths | 3 |
| Total Lines | 6 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 3.576 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 1 | public function parse($annotation, \ReflectionClass $refClass, Endpoint $endpoint) |
|
| 37 | { |
||
| 38 | 1 | if ($objectType = $this->reader->getClassAnnotation($refClass, Annotation\ObjectType::class)) { |
|
|
|
|||
| 39 | 1 | if (!$refClass->implementsInterface(NodeInterface::class)) { |
|
| 40 | $error = sprintf('Invalid object "%s". All entities used as GraphQL object must implements %s', $refClass->getName(), NodeInterface::class); |
||
| 41 | throw new \LogicException($error); |
||
| 42 | } |
||
| 46 |