| 1 | <?php |
||
| 8 | final class Version |
||
| 9 | { |
||
| 10 | private $major; |
||
| 11 | private $minor; |
||
| 12 | private $fix; |
||
| 13 | |||
| 14 | 69 | public function __construct(int $major, int $minor, int $fix) |
|
| 24 | |||
| 25 | 2 | public function major(): int |
|
| 29 | |||
| 30 | 2 | public function minor(): int |
|
| 34 | |||
| 35 | 2 | public function fix(): int |
|
| 39 | |||
| 40 | 1 | public function higherThan(self $version): bool |
|
| 52 | |||
| 53 | 6 | public function compatibleWith(self $version): bool |
|
| 65 | |||
| 66 | 4 | public function __toString(): string |
|
| 75 | } |
||
| 76 |