diff --git a/src/Entity/Package.php b/src/Entity/Package.php index 1f6cd98a9..c9c667309 100644 --- a/src/Entity/Package.php +++ b/src/Entity/Package.php @@ -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; } /** @@ -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; } /** @@ -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 @@ -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