Total Complexity | 5 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Coverage | 78.56% |
Changes | 0 |
1 | <?php |
||
9 | abstract class Item implements SchemaItem |
||
10 | { |
||
11 | use SchemaItemTrait; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $name; |
||
17 | |||
18 | /** |
||
19 | * @var Type|null |
||
20 | */ |
||
21 | protected $type; |
||
22 | |||
23 | /** |
||
24 | * @param string $name |
||
25 | */ |
||
26 | 135 | public function __construct(Schema $schema, $name) |
|
27 | { |
||
28 | 135 | $this->schema = $schema; |
|
29 | 135 | $this->name = $name; |
|
30 | 135 | } |
|
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | 135 | public function getName() |
|
36 | { |
||
37 | 135 | return $this->name; |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param string $name |
||
42 | * |
||
43 | * @return $this |
||
44 | */ |
||
45 | public function setName($name) |
||
46 | { |
||
47 | $this->name = $name; |
||
48 | return $this; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * |
||
53 | * @return Type|null |
||
54 | */ |
||
55 | 63 | public function getType() |
|
56 | { |
||
57 | 63 | return $this->type; |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return $this |
||
62 | */ |
||
63 | 135 | public function setType(Type $type) |
|
67 | } |
||
68 | } |
||
69 |