| 1 | <?php |
||
| 9 | class NodeJsVersionMatcher |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Return true if $version matches $constraint (expressed as a Composer constraint string) |
||
| 13 | * |
||
| 14 | * @param string $version |
||
| 15 | * @param string $constraint |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | public function isVersionMatching($version, $constraint) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Finds the best version matching $constraint. |
||
| 32 | * Will return null if no version matches the constraint. |
||
| 33 | * |
||
| 34 | * @param array $versionList |
||
| 35 | * @param $constraint |
||
| 36 | * @return string|null |
||
| 37 | */ |
||
| 38 | public function findBestMatchingVersion(array $versionList, $constraint) |
||
| 53 | } |
||
| 54 |