| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | trait TypeTrait |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var TypeNodeInterface |
||
| 9 | */ |
||
| 10 | protected $type; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @return TypeNodeInterface |
||
| 14 | */ |
||
| 15 | public function getType() |
||
| 16 | { |
||
| 17 | return $this->type; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @return array |
||
| 22 | */ |
||
| 23 | public function getTypeAST(): array |
||
| 24 | { |
||
| 25 | return $this->type->toAST(); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param TypeNodeInterface $type |
||
| 30 | * @return $this |
||
| 31 | */ |
||
| 32 | public function setType($type) |
||
| 36 | } |
||
| 37 | } |
||
| 38 |