Minor: Fixed some spacing and style

This commit is contained in:
Yahnis Elsts 2019-10-01 13:29:51 +03:00
parent 2f81129b47
commit c30528c55c
1 changed files with 11 additions and 12 deletions

View File

@ -55,8 +55,7 @@ if ( !class_exists('Puc_v4p8_Vcs_GitLabApi', false) ):
$this->userName = implode('/', $parts);
$this->repositoryName = $lastPart;
} else {
// there is a subgroup in the url: gitlab.domain.com/group/subgroup/repository
// maybe there nested subgroups: gitlab.domain.com/group/subgroup/subgroup2/repository
//There could be subgroups in the URL: gitlab.domain.com/group/subgroup/subgroup2/repository
if ( $subgroup !== null ) {
$path = str_replace(trailingslashit($subgroup), '', $path);
}
@ -80,7 +79,7 @@ if ( !class_exists('Puc_v4p8_Vcs_GitLabApi', false) ):
$this->repositoryHost = trailingslashit($this->repositoryHost) . implode('/', $segments);
}
// add subgroups to username
//Add subgroups to username.
if ( $subgroup !== null ) {
$this->userName = $usernameRepo[0] . '/' . untrailingslashit($subgroup);
}
@ -119,7 +118,7 @@ if ( !class_exists('Puc_v4p8_Vcs_GitLabApi', false) ):
'name' => $tag->name,
'version' => ltrim($tag->name, 'v'),
'downloadUrl' => $this->buildArchiveDownloadUrl($tag->name),
'apiResponse' => $tag
'apiResponse' => $tag,
));
}