Callable used to order Status.

@param Status $s1
@param Status $s2

@return int
492061
private function statusComparator($s1, $s2)
    {
        if (array_search($s1->getCode(), $this->statusOrder) === array_search($s2->getCode(), $this->statusOrder)) {
            return 0;
        }

        return (array_search($s1->getCode(), $this->statusOrder)
            < array_search($s2->getCode(), $this->statusOrder)) ? -1 : 1;
    }
842817
protected function filterStatus($status)
    {
        $status = is_numeric($status) ? abs($status) : $status;
        if (!is_integer($status) || $status < 100 || $status > 599) {
            throw new \InvalidArgumentException('Invalid HTTP status code');
        }

        return $status;
    }
1050454
public function status($status = null)
    {
        if ($status === null) {
            return $this->subscription_status;
        } else {
            $this->subscription_status = $status;
            return $this;
        }
    }
180095
public static int compare(String s1, String s2, boolean ignoreCase) {
      if (s1 == null && s2 == null) {
         return 0;
      } else if (s1 == null) {
         return -1;
      } else if (s2 == null) {
         return 1;
      }
      return ignoreCase ? s1.compareToIgnoreCase(s2) : s1.compareTo(s2);
   }
900366
protected function ApiStatus2InternalStatus($status)
    {
        switch ($status) {
            case Api::Success:
                return self::Status_Success;
            case Api::Errors:
                return self::Status_Errors;
            case Api::Warnings:
                return self::Status_Warnings;
            case Api::Exception:
            default:
                return self::Status_Exception;
        }
    }
529821
private function getTypeByStatus($status)
    {
        if (isset($this->typeList[(int) $status])) {
            return $this->typeList[(int) $status];
        } else {
            return false;
        }
    }
209381
public static function switchStatus(string $status)
    {
        if ($status == "off") {
            self::$status = "off";
        } elseif ($status == "on") {
            self::$status = "on";
        } else {
            die("TaskBar : Undefined status '$status'. Status must be 'on' or 'off'. ");
        }
        return (1);
    }
573463
static function orderStatusCount( $showInactive = false )
    {
        $db = eZDB::instance();

        $condText = '';
        if ( !$showInactive )
            $condText = " WHERE is_active = 1";
        $countArray = $db->arrayQuery(  "SELECT count( * ) AS count FROM ezorder_status$condText" );
        return $countArray[0]['count'];
    }
64174
public static int combine(int status1, int status2) {
    return Math.max(action(status1), action(status2)) | Math.max(scope(status1), scope(status2));
  }
1004599
public function compareVersions($version1, $version2)
    {
        $versions = $this->getVersions();
        $key1 = array_search($version1, $versions);
        $key2 = array_search($version2, $versions);

        if ($key1 === false ||
             $key2 === false)
        {
            return 0;
        }

        return $key1 - $key2;
    }
365044
public function setStatus(\Core\Entity\OrderStatus $order_status = null) {
        $this->order_status = $order_status;

        return $this;
    }
441027
public function status($status)
    {
        $httpStatus = (string) $this->response->getStatusCode();
        if (is_array($status) && !in_array($httpStatus, $status)) {
            throw new \RuntimeException(
                "Unexpected response status code: {$httpStatus}"
            );
        }

        if (is_string($status) && $httpStatus !== $status) {
            throw new \RuntimeException(
                "Unexpected response status code: {$httpStatus}"
            );
        }

        return $this;
    }
1218232
public static function checkStatus($status) {
        switch ($status) {
            case self::STATUS_UNMATCHED_SHARED_SECRET:
                return UnmatchedSharedSecretException::getClass();
            default:
                return parent::checkStatus($status);
        }
    }
1041158
public function orders($page = 1, $perPage = 30, $saleSystem = null, array $statuses = [])
    {
        /** @var OrderHandler $handler */
        $handler = $this->requestHandler();
        return $handler->orders($page, $perPage, $saleSystem, $statuses);
    }
93224
public static function __callstatic($index, $params = false)
    {
        if (array_key_exists($index, self::$instances)) {
            self::setCurrentID($index);
            $that = self::getInstance();

            return $that;
        }

        array_unshift($params, $index);

        return call_user_func_array([__CLASS__, 'getOption'], $params);
    }
92392
public static function setResponseStatus(int $status) : void
    {
        if (array_key_exists($status, Http::$http_status_messages)) {
            header('HTTP/1.1 ' . $status . ' ' . Http::$http_status_messages[$status]);
        }
    }
1173982
public static function updateOrderStatus($orderId, $status, $comments) {
        $body = array("status" => $status, "comments" => $comments);
        $response = self::requestApi("put", $body, $orderId);
        return $response->isOk();
    }