From e5aaa14f040c28a09134b7d25af560313423df37 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 25 Jul 2024 16:29:57 +0200 Subject: [PATCH] typo --- src/Type/Php/RegexArrayShapeMatcher.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Type/Php/RegexArrayShapeMatcher.php b/src/Type/Php/RegexArrayShapeMatcher.php index 538bfb591e..6f7bfcb504 100644 --- a/src/Type/Php/RegexArrayShapeMatcher.php +++ b/src/Type/Php/RegexArrayShapeMatcher.php @@ -286,13 +286,13 @@ private function buildArrayType( $countGroups = count($captureGroups); $i = 0; foreach ($captureGroups as $captureGroup) { - $isTraillingOptional = $i >= $countGroups - $trailingOptionals; + $isTrailingOptional = $i >= $countGroups - $trailingOptionals; $groupValueType = $this->getValueType($captureGroup->getType(), $flags); if (!$wasMatched->yes()) { $optional = true; } else { - if (!$isTraillingOptional) { + if (!$isTrailingOptional) { $optional = false; if ($this->containsUnmatchedAsNull($flags) && !$captureGroup->isOptional()) { $groupValueType = TypeCombinator::removeNull($groupValueType); @@ -304,7 +304,7 @@ private function buildArrayType( } } - if (!$isTraillingOptional && $captureGroup->isOptional() && !$this->containsUnmatchedAsNull($flags)) { + if (!$isTrailingOptional && $captureGroup->isOptional() && !$this->containsUnmatchedAsNull($flags)) { $groupValueType = TypeCombinator::union($groupValueType, new ConstantStringType('')); }