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:----fAzWU8/8VIL3R4+Fjwn4qrEnRJyWZNa79nnw+u02m5EV7TEX6L868pPprZD17IOINVgQMpbG6GTaTNnhNpfwqV9iPR4jTwj3yoSKJK6MSbJDvXJhqL5ZZ9n5otZIJJhXM+gh2uYJ7i7VHPGxtEEKzfJfyrBHmwRWoBEzHblVMuMAWm7fu3svl4YJNPa4vFw0mNaPjr9oOc8j7giN+hxTgObTcjijO0TYJ5LCowXyPvftqBwy4/wmb/zK2y1ZuueOqNSE7lq8hdSA57dza5QuxMt+V3xCoV1dpTokzjZEOL4K29z8XeZda4gcJzlRSR7GzB1UgRf4JBNbL7H1gZpn2S0nHfJManl97a/xH8BHRYnXX0uFtBHfS5MD3hTVRpcq/ZDrQgIdfiQ76yxNC3JHAt72928zhefFOxDpOha3qbPUuTlJpT42jNrSRggBV9qvrfqQprrxanD5GhTmrAwvFZ5UU2HoG+8q14fbVMqcLhl2rc8NFbqyPGtCD58ZBG1pkYzqk5T15+iytTt6c3YO+vOk08jYXX74b59wgMGo56+JbODwjsKpuVt5GXZkPhauTDhCWCtQNTe4CJyzpKOexqvzXHNHRWYQ+460wqnsOz4hKWIOeO5R9P+dtJ6kBPLwz/lRN/HxsJtyZGWnenM7Y2WhQUfeAWJK3RblSvSqXMg=----ATTACHMENT:----ODg2MDU3MjY4NDU4NzI1MSA2NjE3NTQxOTczNDY1OTUxIDE0NTM0NjQ1MzU0MzQ1Njk=