| @@ 156-158 (lines=3) @@ | ||
| 153 | */ |
|
| 154 | public function major() : Version |
|
| 155 | { |
|
| 156 | if ('' !== $this->preRelease && 0 === $this->patch && 0 === $this->minor) { |
|
| 157 | return new self($this->major, 0, 0); |
|
| 158 | } |
|
| 159 | ||
| 160 | return new self($this->major + 1, 0, 0); |
|
| 161 | } |
|
| @@ 170-172 (lines=3) @@ | ||
| 167 | */ |
|
| 168 | public function minor() : Version |
|
| 169 | { |
|
| 170 | if ('' !== $this->preRelease && 0 === $this->patch) { |
|
| 171 | return new self($this->major, $this->minor, 0); |
|
| 172 | } |
|
| 173 | ||
| 174 | return new self($this->major, $this->minor + 1, 0); |
|
| 175 | } |
|