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