src/Httpstatus.php
public function getResponseClass($statusCode)
    {
        $responseClass = [
            1 => self::CLASS_INFORMATIONAL,
            2 => self::CLASS_SUCCESS,
            3 => self::CLASS_REDIRECTION,
            4 => self::CLASS_CLIENT_ERROR,
            5 => self::CLASS_SERVER_ERROR,
        ];

        $statusCode = $this->filterStatusCode($statusCode);

        return $responseClass[(int) substr($statusCode, 0, 1)];
    }
public function getResponseClass($statusCode)
    {
        $responseClass = [
            1 => self::CLASS_INFORMATIONAL,
            2 => self::CLASS_SUCCESS,
            3 => self::CLASS_REDIRECTION,
            4 => self::CLASS_CLIENT_ERROR,
            5 => self::CLASS_SERVER_ERROR,
        ];

        $statusCode = $this->filterStatusCode($statusCode);

        return $responseClass[(int) substr($statusCode, 0, 1)];
    }
public function getResponseClass ( $ statusCode ) { $ responseClass = [ 1 => self :: CLASS_INFORMATIONAL , 2 => self :: CLASS_SUCCESS , 3 => self :: CLASS_REDIRECTION , 4 => self :: CLASS_CLIENT_ERROR , 5 => self :: CLASS_SERVER_ERROR , ] ; $ statusCode = $ this -> filterStatusCode ( $ statusCode ) ; return $ responseClass [ ( int ) substr ( $ statusCode , 0 , 1 ) ] ; }
Determines the response class of a response code.

See the `CLASS_` constants for possible return values

@param int $statusCode

@throws InvalidArgumentException If the requested $statusCode is not valid

@return int
Determines the response class of a response code .