@param int $severity

@return bool
183306
private function isError($severity)
    {
        return \in_array(
            $severity,
            [
                E_COMPILE_ERROR,
                E_CORE_ERROR,
                E_USER_ERROR,
                E_PARSE,
                E_ERROR,
            ],
            true
        );
    }
424892
function severity2num (severity) {
	if (!severity) {
		severity = 0;
	} else if (severity === 'error') {
		severity = 1;
	} else if (severity === 'warn') {
		severity = 2;
	} else if (severity === 'info') {
		severity = 3;
	} else {
		severity = 4;
	}
	return severity;
}
119280
public static function isClientError(int $statusCode): bool
    {
        return ($statusCode >= HttpStatus::CLIENT_ERROR) && ($statusCode < HttpStatus::SERVER_ERROR);
    }
1346449
protected function allowedToDiveDeeper(int $depth) : bool
    {
        if ($this->maxDepth == 0) {
            return true;
        }

        return $this->maxDepth >= $depth;
    }
271836
public function isSuccess(int $code): bool
    {
        return $this->statusExists($code) && ($this->extractFirstDigit($code) == self::CLASS_SUCCESS);
    }
278263
public static function RaiseSystemError ($message, $severity = Status::WARNING) {
		$message = Encoding::ConvertToDefaultEncoding($message);
		if (is_array($severity)) {
			$message = vsprintf($message, array_map(function ($value) {return Encoding::ConvertToDefaultEncoding($value);}, $severity));
			$severity = (func_num_args() > 2) ? func_get_arg(3) : Status::WARNING;
		}
		return static::Raise(Status::SystemError($message, $severity));
	}
1020980
public function countIssuesBySeverity(string $severity): int
    {
        $count = 0;
        foreach ($this->files as $file) {
            $count += count($file->getIssuesBySeverity($severity));
        }
        return $count;
    }
176951
protected function write($message, $severity)
    {
        $message = sprintf('Acumulus: %s', $message);
        Mage::log($message, $this->getMagentoSeverity($severity));
    }
850098
private function isProviderEnabled($provider)
    {
        return (bool)$this->scopeConfig->getValue(
            sprintf(SocialLoginService::CONFIG_PATH_SOCIAL_LOGIN_PROVIDER_ENABLED, $provider),
            ScopeInterface::SCOPE_STORE
        );
    }
227630
public function nextIf(int $type): bool
    {
        if (!$this->current->typeEquals($type)) {
            return false;
        }

        $this->next();
        return true;
    }
1211634
public function queryScalar($mode = null)
    {
        $result = $this->query(null, $mode);

        if (is_array($result)) {
            // Filter by values
            $result = array_values($result);
            return isset($result[0]) ? $result[0] : false;
        }

        return false;
    }
100375
public static function bool(int $strength = self::STRENGTH_MEDIUM) : bool
    {
        return (bool) (ord(static::bytes(1, $strength)) % 2);
    }
801751
public static function getLevelsForSeverity($severity)
    {
        $levels = 0;

        foreach (static::$ERROR_TYPES as $level => $info) {
            if ($info['severity'] == $severity) {
                $levels |= $level;
            }
        }

        return $levels;
    }
616793
private function convertLogLevelFromPSRToSyslog($severity)
    {
        switch ($severity) {
            case LogLevel::DEBUG:
                return LOG_DEBUG;
            case LogLevel::INFO:
                return LOG_INFO;
            case LogLevel::NOTICE:
                return LOG_NOTICE;
            case LogLevel::WARNING:
                return LOG_WARNING;
            case LogLevel::ERROR:
                return LOG_ERR;
            case LogLevel::CRITICAL:
                return LOG_CRIT;
            case LogLevel::ALERT:
                return LOG_ALERT;
            case LogLevel::EMERGENCY:
                return LOG_EMERG;
            default:
                return LOG_ERR;
        }
    }
511297
public function isRedirection(int $code): bool
    {
        return $this->statusExists($code) && ($this->extractFirstDigit($code) == self::CLASS_REDIRECTION);
    }
589312
public function hasUsage(StatusInterface $status)
    {
        /** @var StatusableContainerRepositoryInterface $repository */
        foreach ($this->statusableElementRepositories as $repository) {
            if ($repository->hasStatusedElement($status)) {
                return true;
            }
        }

        return false;
    }
961016
public function isProvider($instance)
    {
        $interfaces = class_implements($instance);

        if (isset($interfaces[AbstractProviderInterface::class])) {
            return true;
        }

        return false;
    }