Total Complexity | 3 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | abstract class Item implements SchemaItem |
||
9 | { |
||
10 | use AttributeItemTrait; |
||
11 | use SchemaItemTrait; |
||
12 | |||
13 | /** |
||
14 | * @var Type|null |
||
15 | */ |
||
16 | protected $type; |
||
17 | |||
18 | /** |
||
19 | * @param string $name |
||
20 | */ |
||
21 | 135 | public function __construct(Schema $schema, $name) |
|
22 | { |
||
23 | 135 | $this->schema = $schema; |
|
24 | 135 | $this->name = $name; |
|
25 | 135 | } |
|
26 | |||
27 | /** |
||
28 | * @return Type|null |
||
29 | */ |
||
30 | 63 | public function getType() |
|
31 | { |
||
32 | 63 | return $this->type; |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return $this |
||
37 | */ |
||
38 | 135 | public function setType(Type $type) |
|
43 | } |
||
44 | } |
||
45 |