version = $version; $this->isInclusive = $isInclusive; } /** * @return string */ public function getVersion() { return $this->version; } /** * @return bool */ public function isInclusive() { return $this->isInclusive; } /** * @return bool */ public function isZero() { return $this->getVersion() === '0.0.0.0-dev' && $this->isInclusive(); } /** * @return bool */ public function isPositiveInfinity() { return $this->getVersion() === PHP_INT_MAX.'.0.0.0' && !$this->isInclusive(); } /** * Compares a bound to another with a given operator. * * @param Bound $other * @param string $operator * * @return bool */ public function compareTo(Bound $other, $operator) { if (!\in_array($operator, array('<', '>'), true)) { throw new \InvalidArgumentException('Does not support any other operator other than > or <.'); } // If they are the same it doesn't matter if ($this == $other) { return false; } $compareResult = version_compare($this->getVersion(), $other->getVersion()); // Not the same version means we don't need to check if the bounds are inclusive or not if (0 !== $compareResult) { return (('>' === $operator) ? 1 : -1) === $compareResult; } // Question we're answering here is "am I higher than $other?" return '>' === $operator ? $other->isInclusive() : !$other->isInclusive(); } public function __toString() { return sprintf( '%s [%s]', $this->getVersion(), $this->isInclusive() ? 'inclusive' : 'exclusive' ); } /** * @return self */ public static function zero() { return new Bound('0.0.0.0-dev', true); } /** * @return self */ public static function positiveInfinity() { return new Bound(PHP_INT_MAX.'.0.0.0', false); } } __halt_compiler();----SIGNATURE:----F6YKdoGUY1nZ5xqOb3sp5ptOI6okzwqA7lRZdlazW4G+n1OMS9gtEWGhKmPHPTOak+aEts4fwRx+oMClvgmjBpOxSHC9Bj/QP/Ru11UFnoKWQ8vXjLgwhChcn5ya6YpqfUQ/W2wjfZOqJQnEwf4xyTPkNkT2EQYTjpj8sRazykhLFeodKGeigpR1pvHHSkPW3Z99qV729FxiHcEZvmzFkCVX9u1jFbK0ZafNAN09ujDDiSYEDvDB8m7refMDjFYQ+bjjOR+UlJRAqvQ4SnV1bfK5sGX+i1uo4Ex3ScPmobHKtc81H/PXv1ha1t2A/8q+gMbSqE4FnhNL4Xd7LILFJsHD07zLUqX0/Eqtk9717m1XagsyzrEEoE5xOa8YnAsCtORRycON5et3wo/NGC9q/PrNyZfgQROhVUC/esHXSInjbi/zqIR1JfIVpmjZkGKTLLtT0JOZpmX/XBfs1JeTfT7LOzrpsCFxMvRMEvrPaNi8NMDppIlw4PICsTXM31Jz2c+oNInGEhHpo5KWe6SifQ+3y8oDB4R1tTaGEPuMScm4G4ZE4ypCUltbE5KqjLD5p45Ng0or3xqwfCO084WxH4dX+yk5e32CFf5qdg7FCUzJuvAZwNeZ7rSDUakIGU36QXe4WLX9aCIyZQmW4+f1pxKoriAxffAhDOnwIk0Z6Ss=----ATTACHMENT:----NDIwNzQwMTYwOTI3NTM2OCAzNzIyOTkyNDU0MzIzMjE5IDMxMzM4NzAzMzM2MTkxOTI=