1 | <?php |
||
13 | trait TypePart { |
||
14 | |||
15 | /** @var string */ |
||
16 | private $type; |
||
17 | |||
18 | /** @var string */ |
||
19 | private $typeDescription; |
||
20 | |||
21 | /** @var bool */ |
||
22 | private $typeNullable; |
||
23 | |||
24 | /** |
||
25 | * Sets the type |
||
26 | * |
||
27 | * @param string $type |
||
28 | * @param string $description |
||
29 | * @return $this |
||
30 | */ |
||
31 | 22 | public function setType(?string $type, string $description = null) { |
|
39 | |||
40 | /** |
||
41 | * Sets the description for the type |
||
42 | * |
||
43 | * @param string $description |
||
44 | * @return $this |
||
45 | */ |
||
46 | 10 | public function setTypeDescription(string $description) { |
|
50 | |||
51 | /** |
||
52 | * Returns the type |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | 41 | public function getType(): ?string { |
|
59 | |||
60 | /** |
||
61 | * Returns the type description |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | 10 | public function getTypeDescription(): ?string { |
|
68 | |||
69 | /** |
||
70 | * Returns whether the type is nullable |
||
71 | * |
||
72 | * @return bool |
||
73 | */ |
||
74 | 2 | public function getNullable(): bool { |
|
77 | |||
78 | /** |
||
79 | * Sets the type nullable |
||
80 | * |
||
81 | * @param bool $nullable |
||
82 | * @return $this |
||
83 | */ |
||
84 | 2 | public function setNullable(bool $nullable) { |
|
88 | } |
||
89 |