private function parseScheme(array $locationParts): void
    {
        if (! $this->isValidScheme($locationParts['scheme'])) {
            throw new InvalidArgumentException(
                sprintf('"%s" is not a valid scheme.', $locationParts['scheme'])
            );
        }

        $this->scheme = strtolower($locationParts['scheme']);
    }
private function parseScheme(array $locationParts): void
    {
        if (! $this->isValidScheme($locationParts['scheme'])) {
            throw new InvalidArgumentException(
                sprintf('"%s" is not a valid scheme.', $locationParts['scheme'])
            );
        }

        $this->scheme = strtolower($locationParts['scheme']);
    }
private function parseScheme ( array $ locationParts ) : void { if ( ! $ this -> isValidScheme ( $ locationParts [ 'scheme' ] ) ) { throw new InvalidArgumentException ( sprintf ( '"%s" is not a valid scheme.' , $ locationParts [ 'scheme' ] ) ) ; } $ this -> scheme = strtolower ( $ locationParts [ 'scheme' ] ) ; }
validates and sets the scheme property

@param string[] $locationParts
@throws InvalidArgumentException
validates and sets the scheme property