Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public static function resolveType(array $object): AbstractType |
||
23 | { |
||
24 | if (!array_key_exists($object['type'], config('graphql.types'))) { |
||
25 | throw new UnsupportedTypeException(sprintf('Unsupported entity type `%s`.', $object['type'])); |
||
26 | } |
||
27 | |||
28 | $className = config('graphql.types')[$object['type']]; |
||
29 | |||
30 | return new $className(); |
||
31 | } |
||
33 |