Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
19 | final class Constant implements HasType, HasVisibility |
||
20 | { |
||
21 | use WithTypeDeclaration; |
||
22 | use WithVisibility; |
||
23 | |||
24 | /** @var string */ |
||
25 | private $name; |
||
26 | |||
27 | public function __construct(string $name, TypeDeclaration $type, Visibility $visibility = null) |
||
28 | { |
||
29 | $this->name = $name; |
||
30 | $this->type = $type; |
||
31 | $this->modifier = $visibility ?? Visibility::public(); |
||
32 | } |
||
33 | |||
34 | public function __toString() |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | public function referenceName(): Name |
||
49 |