1 | <?php |
||
20 | final class Version implements VersionInterface |
||
21 | { |
||
22 | /** @var int */ |
||
23 | private $major; |
||
24 | |||
25 | /** @var int */ |
||
26 | private $minor = 0; |
||
27 | |||
28 | /** @var int */ |
||
29 | private $patch = 0; |
||
30 | |||
31 | /** @var LabelInterface */ |
||
32 | private $label; |
||
33 | |||
34 | |||
35 | /** |
||
36 | * Constructor. |
||
37 | * |
||
38 | * If no label is passed then an absent label type will be created & used. |
||
39 | * |
||
40 | * @param int $major |
||
41 | * @param int $minor |
||
42 | * @param int $patch |
||
43 | * @param LabelInterface|null $label |
||
44 | */ |
||
45 | 5 | public function __construct($major, $minor = 0, $patch = 0, LabelInterface $label = null) |
|
56 | |||
57 | /** |
||
58 | * {@inheritDoc} |
||
59 | */ |
||
60 | 2 | public function isSatisfiedBy(VersionInterface $version) |
|
64 | |||
65 | /** |
||
66 | * {@inheritDoc} |
||
67 | */ |
||
68 | 2 | public function getMajor() |
|
72 | |||
73 | /** |
||
74 | * {@inheritDoc} |
||
75 | */ |
||
76 | 2 | public function getMinor() |
|
80 | |||
81 | /** |
||
82 | * {@inheritDoc} |
||
83 | */ |
||
84 | 2 | public function getPatch() |
|
88 | |||
89 | /** |
||
90 | * {@inheritDoc} |
||
91 | */ |
||
92 | 2 | public function getLabel() |
|
96 | |||
97 | /** |
||
98 | * {@inheritDoc} |
||
99 | */ |
||
100 | 4 | public function __toString() |
|
118 | } |
||
119 |