예제 #1
0
파일: Version.php 프로젝트: omines/semver
 /**
  * @param VersionInterface $that Version to compare to.
  * @return integer|double Negative is this is smaller, positive if that is smaller, or 0 if equals.
  */
 public function compare(VersionInterface $that)
 {
     return $this->version->compare($that->getVersion()) ?: $this->prerelease->compare($that->getPrerelease());
 }
예제 #2
0
파일: Primitive.php 프로젝트: omines/semver
 public function getNormalizedString()
 {
     $operator = $this->negate ? self::$inversions[$this->operator] : $this->operator;
     return ($operator === self::OPERATOR_EQ ? '' : $operator) . $this->version->getNormalizedString();
 }