src/Httpstatus.php
public function getStatusCode($statusText)
    {
        $statusText = $this->filterReasonPhrase($statusText);
        $statusCode = $this->fetchStatusCode($statusText);
        if ($statusCode !== false) {
            return $statusCode;
        }

        throw new OutOfBoundsException(sprintf('No Http status code is associated to `%s`', $statusText));
    }
public function getStatusCode($statusText)
    {
        $statusText = $this->filterReasonPhrase($statusText);
        $statusCode = $this->fetchStatusCode($statusText);
        if ($statusCode !== false) {
            return $statusCode;
        }

        throw new OutOfBoundsException(sprintf('No Http status code is associated to `%s`', $statusText));
    }
public function getStatusCode ( $ statusText ) { $ statusText = $ this -> filterReasonPhrase ( $ statusText ) ; $ statusCode = $ this -> fetchStatusCode ( $ statusText ) ; if ( $ statusCode !== false ) { return $ statusCode ; } throw new OutOfBoundsException ( sprintf ( 'No Http status code is associated to `%s`' , $ statusText ) ) ; }
Get the code for a given status text.

@param string $statusText http status text

@throws InvalidArgumentException If the requested $statusText is not valid
@throws OutOfBoundsException     If not status code is found

@return string Returns code for the given status text
Get the code for a given status text .