Skip to content

Commit

Permalink
fix: phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Dec 2, 2024
1 parent 1a74bb4 commit c22b4c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Command/GithubCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private function assembleContextByUrl(string $url): Context
{
$pregMatch = preg_match('/^https:\/\/github\.com\/(?<owner>[\w\-]*)\/(?<repo>[\w\-]*)\/pull\/(?<id>\d*)/', $url, $matches);

if ($pregMatch === 0) {
if ($pregMatch === 0 || !isset($matches['owner'], $matches['repo'], $matches['id'])) {
throw new \InvalidArgumentException('The given url must be a valid Github URL');
}

Expand Down

0 comments on commit c22b4c4

Please sign in to comment.