Total Complexity | 3 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | class Constant implements HasType |
||
11 | { |
||
12 | use WithTypeDeclaration; |
||
13 | |||
14 | /** @var string */ |
||
15 | private $name; |
||
16 | |||
17 | 33 | public function __construct(string $name, TypeDeclaration $type = null) |
|
18 | { |
||
19 | 33 | $this->name = $name; |
|
20 | 33 | $this->type = $type ?? TypeDeclaration::absent(); |
|
21 | 33 | } |
|
22 | |||
23 | 27 | public function __toString() |
|
29 | ); |
||
30 | } |
||
32 |