Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jul 1, 2024
1 parent 92793fa commit 1ad0179
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Type/Php/RegexArrayShapeMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private function getOnlyOptionalTopLevelGroup(array $captureGroups): ?RegexCaptu
*/
private function getOnlyTopLevelAlternationId(array $captureGroups): ?int
{
$alternationID = null;
$alternationId = null;
foreach ($captureGroups as $captureGroup) {
if (!$captureGroup->isTopLevel()) {
continue;
Expand All @@ -210,14 +210,14 @@ private function getOnlyTopLevelAlternationId(array $captureGroups): ?int
return null;
}

if ($alternationID === null) {
$alternationID = $captureGroup->getAlternationId();
} elseif ($alternationID !== $captureGroup->getAlternationId()) {
if ($alternationId === null) {
$alternationId = $captureGroup->getAlternationId();
} elseif ($alternationId !== $captureGroup->getAlternationId()) {
return null;
}
}

return $alternationID;
return $alternationId;
}

/**
Expand Down

0 comments on commit 1ad0179

Please sign in to comment.