class ForkRemote
{
+ /**
+ * Contains error message when parse() failed
+ */
+ public $error;
+
protected $url;
/**
public function parse()
{
+ if ($this->url == '') {
+ $this->error = 'Empty fork URL';
+ return false;
+ }
+
$arUrl = parse_url($this->url);
$scheme = isset($arUrl['scheme']) ? $arUrl['scheme'] : '';
}
}
- return $count > 0;
+ if ($count > 0) {
+ return true;
+ }
+
+ $this->error = 'No git:// clone URL found';
+ return false;
}
/**