| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 33 | public function __construct(Parser $parser, string $name, $type = null) |
||
| 34 | { |
||
| 35 | $this->parser = $parser; |
||
| 36 | $this->setName($name); |
||
| 37 | |||
| 38 | if ($type instanceof Type) { |
||
| 39 | $this->type = $type; |
||
| 40 | } elseif (!$type) { |
||
| 41 | $this->type = $parser->getSchema()->getType($name); |
||
| 42 | } else { |
||
| 43 | throw new Exception('Invalid model'); |
||
| 44 | } |
||
| 59 |