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