Skip to content

Commit c2f6808

Browse files
committed
Use new matchExpr API
1 parent bd3aec3 commit c2f6808

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/PHPStan/PregMatchParameterOutTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getParameterOutTypeFromStaticMethodCall(MethodReflection $method
5353
}
5454
$patternType = $scope->getType($patternArg->value);
5555

56-
return $this->regexShapeMatcher->matchType($patternType, $flagsType, TrinaryLogic::createMaybe());
56+
return $this->regexShapeMatcher->matchExpr($patternType, $flagsType, TrinaryLogic::createMaybe());
5757
}
5858

5959
}

src/PHPStan/PregMatchTypeSpecifyingExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function specifyTypes(MethodReflection $methodReflection, StaticCall $nod
6868
}
6969
$patternType = $scope->getType($patternArg->value);
7070

71-
$matchedType = $this->regexShapeMatcher->matchType($patternType, $flagsType, TrinaryLogic::createFromBoolean($context->true()));
71+
$matchedType = $this->regexShapeMatcher->matchExpr($patternType, $flagsType, TrinaryLogic::createFromBoolean($context->true()));
7272
if ($matchedType === null) {
7373
return new SpecifiedTypes();
7474
}

src/PHPStan/UnsafeStrictGroupsCallRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function processNode(Node $node, Scope $scope): array
7777
}
7878
$patternType = $scope->getType($patternArg->value);
7979

80-
$matchedType = $this->regexShapeMatcher->matchType($patternType, $flagsType, TrinaryLogic::createYes());
80+
$matchedType = $this->regexShapeMatcher->matchExpr($patternType, $flagsType, TrinaryLogic::createYes());
8181
if ($matchedType === null) {
8282
return [
8383
RuleErrorBuilder::message(sprintf('The %s call is potentially unsafe as $matches\' type could not be inferred.', $node->name->name))

0 commit comments

Comments
 (0)