| 1 | <?php |
||
| 19 | final class LessOrEqualTo implements ComparatorInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Return true if the left version is less or equal to the right version. |
||
| 23 | * |
||
| 24 | * @param VersionInterface $lVersion |
||
| 25 | * @param VersionInterface $rVersion |
||
| 26 | * |
||
| 27 | * @return boolean |
||
| 28 | */ |
||
| 29 | 21 | public function compare(VersionInterface $lVersion, VersionInterface $rVersion) |
|
| 30 | { |
||
| 31 | return ( |
||
| 32 | 21 | (new LessThan())->compare($lVersion, $rVersion) |
|
| 33 | 13 | || (new EqualTo())->compare($lVersion, $rVersion) |
|
| 34 | 21 | ); |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 1 | public function __toString() |
|
| 44 | } |
||
| 45 |