/** * @param string * @return string */ public static function normalizeUrl($url) { $data = Github\Repository::getVendorAndName($url); if (is_null($data)) { return NULL; } return 'https://github.com/' . $data[0] . '/' . $data[1]; }
/** * @param string * @return bool */ public static function isValid($url) { return is_array(GitHub\Repository::getVendorAndName($url)); }