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:----EIJ4ucIFzMtHAa7m+vY0ybz8R6Zlt58Xlydh4VA9vD3cWNJrwn5Kx3z1S7vwVhGU01ZvcoYKo3kDa+N7eyVrQGAtJibHx2eIXvLCiAnrX0+prWGtgnnB+8ELlhulUURG1FLKeMHyvg9pwKb/YH7CUAUrsbfCHe9rPzv2g1XZ26wbs7FejqX9odOjZw8CAQiLCfUV0DJO5sTkB55sNGvzDQfi1+FLkDDHLO+qMc3Nc1ra2iW6McDpXLPhRIBWyUS7CUmV6DQbnP7Ip7B27ASeyhDCYGOzRoaYDNf8ex+7+8UdZh3XeUk+8wTC4EotmaAie3qQX/cbeNa+svAs1OCrOcqV24CbYbyc+s7ftY7fYGME9CcL4WjEe88DN/BK55O+zp12Hq/9ttYA8066rORM40Z+1bFAwZQiOFsgKDaYSSkE+QQuA76DANORqVn1SPCQLpcLambDKUw7kadWLUsU9igeSRAn9XWgCfYl82OCrOg4WNgnZjcQ8ru3v5pxneLnJVH9jom5+UN6FqQIBKfoEafayz7YwMkpliYGyJI+fMKfu2I6ouKBn8NtM/wemvMupWv66bV8KSRTjswPbXV4eGXv0OPeeIw99uEX/PTVLasQvEgdf1/scV3gUpgnu9cyHcth91mbqPfSnz9ct66wKWpXNxl+Hu9mcIh8pDKNYtI=----ATTACHMENT:----NjcyNjQwNzA4Njc0Mzg1NCAyMDIxNDY0OTIxNjI5Mjg5IDgyNDQzNTk4MjY1MTcwOTc=