From 2c706e565149dc27bc452dd7861a897bb787100b Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Sun, 24 Dec 2023 00:11:29 +0100 Subject: [PATCH] Fix for return datatype of new functions in App\Entity\Package --- src/Entity/Package.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Entity/Package.php b/src/Entity/Package.php index 59381e494..1f6cd98a9 100644 --- a/src/Entity/Package.php +++ b/src/Entity/Package.php @@ -274,7 +274,10 @@ public function getVendor(): string return $this->vendor; } - public function isGitHub(): array|bool + /** + * @return array Vendor and package name + */ + public function isGitHub(): array|false { if (Preg::isMatchStrictGroups('{^(?:git://|git@|https?://)github.com[:/]([^/]+)/(.+?)(?:\.git|/)?$}i', $this->getRepository(), $match)) { return $match; @@ -284,7 +287,10 @@ public function isGitHub(): array|bool } } - public function isGitLab(): array|bool + /** + * @return array Vendor and package name + */ + public function isGitLab(): array|false { if (Preg::isMatchStrictGroups('{^(?:git://|git@|https?://)gitlab.com[:/]([^/]+)/(.+?)(?:\.git|/)?$}i', $this->getRepository(), $match)) { return $match;