protected function validateStatusCode(int $code): int
    {
        if (StatusCode::MIN > $code || $code > StatusCode::MAX) {
            throw new InvalidStatusCode(
                sprintf(
                    'Invalid status code "%d"; must adhere to values set in the %s enum class.',
                    $code,
                    StatusCode::class
                )
            );
        }

        return $code;
    }
protected function validateStatusCode(int $code): int
    {
        if (StatusCode::MIN > $code || $code > StatusCode::MAX) {
            throw new InvalidStatusCode(
                sprintf(
                    'Invalid status code "%d"; must adhere to values set in the %s enum class.',
                    $code,
                    StatusCode::class
                )
            );
        }

        return $code;
    }
protected function validateStatusCode ( int $ code ) : int { if ( StatusCode :: MIN > $ code || $ code > StatusCode :: MAX ) { throw new InvalidStatusCode ( sprintf ( 'Invalid status code "%d"; must adhere to values set in the %s enum class.' , $ code , StatusCode :: class ) ) ; } return $ code ; }
Validate a status code.

@param int $code The code

@throws \Valkyrja\HttpMessage\Exceptions\InvalidStatusCode

@return int
Validate a status code .