protected function getScheme(?string $scheme, ?string $domain = null) : string
    {
        if ($scheme === null || $scheme === '//') {
            return $this->tryGuessScheme($domain);
        }

        return $this->trim($scheme, ':/') . '://';
    }
protected function getScheme(?string $scheme, ?string $domain = null) : string
    {
        if ($scheme === null || $scheme === '//') {
            return $this->tryGuessScheme($domain);
        }

        return $this->trim($scheme, ':/') . '://';
    }
protected function getScheme ( ? string $ scheme , ? string $ domain = null ) : string { if ( $ scheme === null || $ scheme === '//' ) { return $ this -> tryGuessScheme ( $ domain ) ; } return $ this -> trim ( $ scheme , ':/' ) . '://' ; }
Get url scheme

@param string|null $scheme
@param null|string $domain
@return string
Get url scheme