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:----R5A9Ec0eDx5Z3xtT8ZbsLQyNmNtyv3GYRXInrT5k4znClXPkkwMKZdda3tBflFNmoMUNcLgAZu8MXGDWXwdJKveuAY2+yQwElpn+w4+QWKtgSLfIHUc+4GzcH2WEv9AF8hq3EqZkbV3J9tDx/4alVKnD1HEpzEhldsdwVKtQLI8/UBuoGWMvb5UzUDqF4lZgK/I3KiEd3JRtznI77yxxML9WjbOnZaJOVQj//wFqk/1CxSNUSNJHvdy+b5eCsC/mvW+aXO+uRIuXVy/cX58B57q/stARYoNXr83uGa8FosnhTIoNFSlaoR2k2vetoiSDm1rVeY4u7m/yHQlKfPpybZbb2/All/MACqWmapecsR+ipkyL1YTWCP6vwScWVzhF1oG4tc5Vxivs29kHLuIG6/X6vsrOewmXAObGP9vKqCrDV6N0vUqriOQXf4iMXptpitlzRjlMbRFWTz6dzT528DtO2UgEEUShwzZsS2ZiByevQCYgFD9y46ZhOyLuiO6edtldUQhKXIwOmeVpz9c+WwIiEap+4+eKMbGNah+AgCZevKe6WLQ7uVuiJzifybEG/+6vJ06Mixsje1mHU/FDE+SvKsGKUDk6Xrt/mnruxYRMHDjtqnJX9yqAY2LHJKkXNbu7+zP+SiIukaJ1csKrzGR1kLJh+LuG7tGBvF+6ZIs=----ATTACHMENT:----Mjk2MDQ5MjIyMjI4MDkwIDk0ODg2NTcxMDI0MzU2ODIgNjg0NTE5MTIzOTc0OTk2Nw==