protected function return_repo_type()
{
$type = explode('_', $this->type->type);
$arr = array();
$arr['type'] = $type[1];
switch ($type[0]) {
case 'github':
$arr['repo'] = 'github';
$arr['base_uri'] = 'https://api.github.com';
$arr['base_download'] = 'https://github.com';
break;
case 'bitbucket':
$arr['repo'] = 'bitbucket';
$arr['base_uri'] = 'https://bitbucket.org/api';
$arr['base_download'] = 'https://bitbucket.org';
break;
case 'gitlab':
$arr['repo'] = 'gitlab';
$arr['base_uri'] = 'https://gitlab.com/api/v3';
$arr['base_download'] = 'https://gitlab.com';
break;
}
return $arr;
}