| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function mapNameToType(string $typeName): Type |
||
| 34 | { |
||
| 35 | if ($this->schema === null) { |
||
| 36 | throw new RuntimeException('You must register a schema first before resolving types.'); |
||
| 37 | } |
||
| 38 | |||
| 39 | $type = $this->schema->getType($typeName); |
||
| 40 | if ($type === null) { |
||
| 41 | throw CannotMapTypeException::createForName($typeName); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $type; |
||
| 45 | } |
||
| 47 |