Example #1
0
 /**
  * Returns true if left & right major, minor, patch & label precedence values match & left label version is less
  * than right patch version.
  *
  * @param VersionInterface $lVersion
  * @param VersionInterface $rVersion
  *
  * @return bool
  */
 private function compareLabelVersion(VersionInterface $lVersion, VersionInterface $rVersion)
 {
     return $lVersion->getMajor() == $rVersion->getMajor() && $lVersion->getMinor() == $rVersion->getMinor() && $lVersion->getPatch() == $rVersion->getPatch() && $lVersion->getLabel()->getPrecedence() == $rVersion->getLabel()->getPrecedence() && $lVersion->getLabel()->getVersion() < $rVersion->getLabel()->getVersion();
 }
Example #2
0
 /**
  * Return true if the versions match.
  *
  * @param VersionInterface $lVersion
  * @param VersionInterface $rVersion
  *
  * @return boolean
  */
 public function compare(VersionInterface $lVersion, VersionInterface $rVersion)
 {
     return $lVersion->__toString() === $rVersion->__toString();
 }