|
@@ 304-314 (lines=11) @@
|
| 301 |
|
* @return string Version number that meets the requirement. |
| 302 |
|
* @throws RuntimeException If the requirement could not be satisfied. |
| 303 |
|
*/ |
| 304 |
|
protected function getGreaterThanVersion($milestone) |
| 305 |
|
{ |
| 306 |
|
$data = $this->releases->getAll(); |
| 307 |
|
foreach ($data as $version => $date) { |
| 308 |
|
if (version_compare($version, $milestone, '>')) { |
| 309 |
|
return $version; |
| 310 |
|
} |
| 311 |
|
} |
| 312 |
|
|
| 313 |
|
throw new RuntimeException('Could not satisfy version requirements.'); |
| 314 |
|
} |
| 315 |
|
|
| 316 |
|
/** |
| 317 |
|
* Get a version lesser than the milestone. |
|
@@ 326-336 (lines=11) @@
|
| 323 |
|
* @return string Version number that meets the requirement. |
| 324 |
|
* @throws RuntimeException If the requirement could not be satisfied. |
| 325 |
|
*/ |
| 326 |
|
protected function getLesserThanVersion($milestone) |
| 327 |
|
{ |
| 328 |
|
$data = $this->releases->getAll(); |
| 329 |
|
foreach ($data as $version => $date) { |
| 330 |
|
if (version_compare($version, $milestone, '<')) { |
| 331 |
|
return $version; |
| 332 |
|
} |
| 333 |
|
} |
| 334 |
|
|
| 335 |
|
throw new RuntimeException('Could not satisfy version requirements.'); |
| 336 |
|
} |
| 337 |
|
|
| 338 |
|
/** |
| 339 |
|
* Get a version greater or equal than the milestone. |