src/rehyved/Http/HttpStatus.php
public static function getReasonPhrase(int $statusCode): string
    {
        if (array_key_exists($statusCode, HttpStatus::REASON_PHRASES)) {
            return HttpStatus::REASON_PHRASES[$statusCode];
        }
        throw new \InvalidArgumentException("Invalid status code");
    }
public static function getReasonPhrase(int $statusCode): string
    {
        if (array_key_exists($statusCode, HttpStatus::REASON_PHRASES)) {
            return HttpStatus::REASON_PHRASES[$statusCode];
        }
        throw new \InvalidArgumentException("Invalid status code");
    }
public static function getReasonPhrase ( int $ statusCode ) : string { if ( array_key_exists ( $ statusCode , HttpStatus :: REASON_PHRASES ) ) { return HttpStatus :: REASON_PHRASES [ $ statusCode ] ; } throw new \ InvalidArgumentException ( "Invalid status code" ) ; }
Retrieve the reason phrase for the provided HTTP status code
@param int $statusCode the status code for which to retrieve the reason phrase
@return string the reason phrase
@throws \InvalidArgumentException if the provided value is not a valid HTTP status code
Retrieve the reason phrase for the provided HTTP status code