src/Uri.php
private function normalizeScheme($scheme)
    {
        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($this->validSchema[$scheme])) {
            throw new InvalidArgumentException('Uri scheme must be one of: "", "https", "http"');
        }

        return $scheme;
    }
private function normalizeScheme($scheme)
    {
        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($this->validSchema[$scheme])) {
            throw new InvalidArgumentException('Uri scheme must be one of: "", "https", "http"');
        }

        return $scheme;
    }
private function normalizeScheme ( $ scheme ) { 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 ( $ this -> validSchema [ $ scheme ] ) ) { throw new InvalidArgumentException ( 'Uri scheme must be one of: "", "https", "http"' ) ; } return $ scheme ; }
Normalize scheme part of Uri.

@param string $scheme Raw Uri scheme.

@return string Normalized Uri

@throws InvalidArgumentException If the Uri scheme is not a string.
@throws InvalidArgumentException If Uri scheme is not "", "https", or "http".
Normalize scheme part of Uri .