protected function filterScheme($scheme): string
    {
        if (!\is_string($scheme) && !\method_exists($scheme, '__toString')) {
            throw new \InvalidArgumentException('Uri scheme must be a string');
        }

        $scheme = \str_replace('://', '', \strtolower((string)$scheme));
        if (!isset(static::$validScheme[$scheme])) {
            throw new \InvalidArgumentException('Uri scheme must be one of: "", "https", "http"');
        }

        return $scheme;
    }
protected function filterScheme($scheme): string
    {
        if (!\is_string($scheme) && !\method_exists($scheme, '__toString')) {
            throw new \InvalidArgumentException('Uri scheme must be a string');
        }

        $scheme = \str_replace('://', '', \strtolower((string)$scheme));
        if (!isset(static::$validScheme[$scheme])) {
            throw new \InvalidArgumentException('Uri scheme must be one of: "", "https", "http"');
        }

        return $scheme;
    }
protected function filterScheme ( $ scheme ) : string { if ( ! \ is_string ( $ scheme ) && ! \ method_exists ( $ scheme , '__toString' ) ) { throw new \ InvalidArgumentException ( 'Uri scheme must be a string' ) ; } $ scheme = \ str_replace ( '://' , '' , \ strtolower ( ( string ) $ scheme ) ) ; if ( ! isset ( static :: $ validScheme [ $ scheme ] ) ) { throw new \ InvalidArgumentException ( 'Uri scheme must be one of: "", "https", "http"' ) ; } return $ scheme ; }
Filter Uri scheme.
@param  string $scheme Raw Uri scheme.
@return string
@throws \InvalidArgumentException If the Uri scheme is not a string.
@throws \InvalidArgumentException If Uri scheme is not "", "https", or "http".
Filter Uri scheme .