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:----VWdpJddfL/mbqCzeC5l+IzT4o4EO0wnJh8PhDdGMP2TP/zW+qnSncnDw+msMniWmwWbkA1nc6028cez3i198DXu6POoSUqmyqz+AFqNJuy3qC4b91RglIHzv5VyZAejilR2EveH4mn0mPW7SKrcFCM169YrnyvBOTnknFNDR4UhqICJWuIfURO6dZGbHIH+tdG3vH4/6134FkgMHlOlfKQOIu8kRhcAuUHpRHtm+byMvoaJQF/Ga8A3V3IALVjptVScMyZlHrZiAVPNgs9JLnZ4Iygsqumy/IkwTRnV71K7hD+eiy1Mma9i2mccRB/Vsa+Vz/+k5EtfpTV/ZJzC77FHqNE5Jv7eS8YInA5XVqw0t6Vjn4OUPEsW0ByhetQCyG09u1GHRih0p0kAFkdEGC+SmXmctTKdL+mIAyjMFpX3r5988LSbkKoeCvrHOe5zRvPwi/UiACD2v6Cy6C8xHN6kVTeC/Cu0+T9ZZlCjVlMKmtxuRg/aJ86GJd+dqXxXvitbJYW+A743cD5RNxUJXldI1QSSGbFBQ0Spq/6+3XIPLQ1vBpy0l629ZwRj5NPZf4CH02qdFr/tbt9PwJnXQ7i7sJ/LpXpyfsmqzqcss4kP7/AIJdVq4kjc60U45PxUrhv9a0kK74U+t5JfsJHRxG1tkhPEeqbzsqUW3y5tv4vQ=----ATTACHMENT:----MTY1Mjc1OTU4Nzg1ODQzNiA2NDA2OTEyMzk2NzQyNzY3IDM2NjA4MDA0MjUwODUwMTE=