Skip to content

Commit

Permalink
Fix for return datatype of new functions in App\Entity\Package
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Dec 23, 2023
1 parent 8efb143 commit 2c706e5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Entity/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ public function getVendor(): string
return $this->vendor;
}

public function isGitHub(): array|bool
/**
* @return array<string> Vendor and package name
*/
public function isGitHub(): array|false
{
if (Preg::isMatchStrictGroups('{^(?:git://|git@|https?://)github.com[:/]([^/]+)/(.+?)(?:\.git|/)?$}i', $this->getRepository(), $match)) {
return $match;
Expand All @@ -284,7 +287,10 @@ public function isGitHub(): array|bool
}
}

public function isGitLab(): array|bool
/**
* @return array<string> Vendor and package name
*/
public function isGitLab(): array|false
{
if (Preg::isMatchStrictGroups('{^(?:git://|git@|https?://)gitlab.com[:/]([^/]+)/(.+?)(?:\.git|/)?$}i', $this->getRepository(), $match)) {
return $match;
Expand Down

0 comments on commit 2c706e5

Please sign in to comment.