Skip to content

Commit

Permalink
Codestyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek authored Jan 8, 2024
1 parent 2c706e5 commit b1de810
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/Entity/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@ public function isGitHub(): array|false
if (Preg::isMatchStrictGroups('{^(?:git://|git@|https?://)github.com[:/]([^/]+)/(.+?)(?:\.git|/)?$}i', $this->getRepository(), $match)) {
return $match;
}
else {
return false;
}

return false;
}

/**
Expand All @@ -295,9 +294,8 @@ public function isGitLab(): array|false
if (Preg::isMatchStrictGroups('{^(?:git://|git@|https?://)gitlab.com[:/]([^/]+)/(.+?)(?:\.git|/)?$}i', $this->getRepository(), $match)) {
return $match;
}
else {
return false;
}

return false;
}

/**
Expand Down Expand Up @@ -364,13 +362,12 @@ public function getGitHubStarsUrl(): string|null
{
if ($this->isGitHub()) {
return $this->getBrowsableRepository() . '/stargazers';
}
else if ($this->isGitLab()) {
}
if ($this->isGitLab()) {
return $this->getBrowsableRepository() . '/-/starrers';
}
else {
return null;
}

return null;
}

public function setGitHubWatches(int|null $val): void
Expand Down Expand Up @@ -398,12 +395,11 @@ public function getGitHubForksUrl(): string|null
if ($this->isGitHub()) {
return $this->getBrowsableRepository() . '/forks';
}
else if ($this->isGitLab()) {
if ($this->isGitLab()) {
return $this->getBrowsableRepository() . '/-/forks';
}
else {
return null;
}

return null;
}

public function setGitHubOpenIssues(int|null $val): void
Expand Down

0 comments on commit b1de810

Please sign in to comment.