BackBee\Event\Listener\ExceptionListener::getHttpStatusCode PHP Method

getHttpStatusCode() private method

Returns a valid HTTP status code.
private getHttpStatusCode ( integer $statusCode ) : integer
$statusCode integer
return integer
    private function getHttpStatusCode($statusCode)
    {
        if ($statusCode >= 100 && $statusCode < 600) {
            return $statusCode;
        } elseif (FrontControllerException::BAD_REQUEST === $statusCode || FrontControllerException::INTERNAL_ERROR === $statusCode || FrontControllerException::NOT_FOUND === $statusCode) {
            return $statusCode - FrontControllerException::UNKNOWN_ERROR;
        }
        return 500;
    }