HttpResponse.php
function setStatusCode($status)
    {
        if (! is_numeric($status)
            || is_float($status)
            || $status < 100
            || $status >= 600
        )
            throw new \InvalidArgumentException(sprintf(
                'Invalid status code "%s"; must be an integer between 100 and 599, inclusive',
                (is_scalar($status) ? $status : gettype($status))
            ));

        $this->statCode = $status;
        return $this;
    }
function setStatusCode($status)
    {
        if (! is_numeric($status)
            || is_float($status)
            || $status < 100
            || $status >= 600
        )
            throw new \InvalidArgumentException(sprintf(
                'Invalid status code "%s"; must be an integer between 100 and 599, inclusive',
                (is_scalar($status) ? $status : gettype($status))
            ));

        $this->statCode = $status;
        return $this;
    }
function setStatusCode ( $ status ) { if ( ! is_numeric ( $ status ) || is_float ( $ status ) || $ status < 100 || $ status >= 600 ) throw new \ InvalidArgumentException ( sprintf ( 'Invalid status code "%s"; must be an integer between 100 and 599, inclusive' , ( is_scalar ( $ status ) ? $ status : gettype ( $ status ) ) ) ) ; $ this -> statCode = $ status ; return $ this ; }
Set Response Status Code

@param int $status

@return $this
Set Response Status Code