| Total Complexity | 7 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class EnumValue implements EnumValueInterface |
||
| 10 | { |
||
| 11 | private readonly string $description; |
||
| 12 | private readonly string $deprecationReason; |
||
| 13 | |||
| 14 | 2 | public function __construct( |
|
| 15 | private readonly string $name, |
||
| 16 | private readonly mixed $value, |
||
| 17 | ?string $description = null, |
||
| 18 | ?string $deprecationReason = null, |
||
| 19 | ) { |
||
| 20 | 2 | if (null !== $description) { |
|
| 21 | 1 | $this->description = $description; |
|
|
|
|||
| 22 | } |
||
| 23 | |||
| 24 | 2 | if (null !== $deprecationReason) { |
|
| 25 | 1 | $this->deprecationReason = $deprecationReason; |
|
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | |||
| 30 | 2 | public function getName(): string |
|
| 33 | } |
||
| 34 | |||
| 35 | 2 | public function getDescription(): ?string |
|
| 38 | } |
||
| 39 | |||
| 40 | 2 | public function getDeprecationReason(): ?string |
|
| 41 | { |
||
| 42 | 2 | return $this->deprecationReason ?? null; |
|
| 43 | } |
||
| 44 | |||
| 45 | 2 | public function getValue(): mixed |
|
| 48 | } |
||
| 49 | } |
||
| 50 |