Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.072 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 45 | public function __construct(TypeInterface $type, Location $location = NULL) |
|
19 | { |
||
20 | 45 | if (!($type instanceof NamedType || $type instanceof ListType)) { |
|
21 | throw new \InvalidArgumentException(sprintf('Invalid type %s.', get_class($type))); |
||
22 | } |
||
23 | |||
24 | 45 | parent::__construct($location, ['type' => $type]); |
|
25 | 45 | } |
|
26 | } |
||
27 |