Knp\Bundle\KnpBundlesBundle\Github\Owner::fixUrl PHP Method

fixUrl() private method

Adds http protocol by default, when no protocol is specified.
private fixUrl ( string $url ) : string
$url string
return string
    private function fixUrl($url)
    {
        $scheme = parse_url($url, PHP_URL_SCHEME);
        if (null === $scheme) {
            return 'http://' . $url;
        }
        return $url;
    }