public function gitUrl($url)
    {
        // Source/credit: https://github.com/jonschlinkert/is-git-url/blob/master/index.js
        $options = ['options' => ['regexp' => '/(?:git|ssh|https?|git@[\w\.]+):(?:\/\/)?[\w\.@:\/~_-]+\.git(?:\/?|\#[\d\w\.\-_]+?)$/']];
        if (filter_var($url, FILTER_VALIDATE_REGEXP, $options) === false) {
            throw new \InvalidArgumentException(sprintf('Invalid URL: %s', $url));
        }

        return $url;
    }
public function gitUrl($url)
    {
        // Source/credit: https://github.com/jonschlinkert/is-git-url/blob/master/index.js
        $options = ['options' => ['regexp' => '/(?:git|ssh|https?|git@[\w\.]+):(?:\/\/)?[\w\.@:\/~_-]+\.git(?:\/?|\#[\d\w\.\-_]+?)$/']];
        if (filter_var($url, FILTER_VALIDATE_REGEXP, $options) === false) {
            throw new \InvalidArgumentException(sprintf('Invalid URL: %s', $url));
        }

        return $url;
    }
public function gitUrl ( $ url ) { // Source/credit: https://github.com/jonschlinkert/is-git-url/blob/master/index.js $ options = [ 'options' => [ 'regexp' => '/(?:git|ssh|https?|git@[\w\.]+):(?:\/\/)?[\w\.@:\/~_-]+\.git(?:\/?|\#[\d\w\.\-_]+?)$/' ] ] ; if ( filter_var ( $ url , FILTER_VALIDATE_REGEXP , $ options ) === false ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid URL: %s' , $ url ) ) ; } return $ url ; }
Validate git URL.

@param string $url

@return string
Validate git URL .