| Total Complexity | 4 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | final class Cores |
||
| 9 | { |
||
| 10 | private int $value; |
||
| 11 | |||
| 12 | 24 | public function __construct(int $value) |
|
| 13 | { |
||
| 14 | 24 | if ($value < 1) { |
|
| 15 | 3 | throw new DomainException((string) $value); |
|
| 16 | } |
||
| 17 | |||
| 18 | 21 | $this->value = $value; |
|
| 19 | 21 | } |
|
| 20 | |||
| 21 | 3 | public function toInt(): int |
|
| 24 | } |
||
| 25 | |||
| 26 | 3 | public function toString(): string |
|
| 31 |