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