Skip to content

Commit 78db3ac

Browse files
committed
[BCB] Remove RegexArrayShapeMatcher::matchType(), use matchExpr() instead
1 parent 9b918e3 commit 78db3ac

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

UPGRADING.md

+1
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,4 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
236236
* Remove `ArrayType::count()`, use `Type::getArraySize()` instead
237237
* Remove `ArrayType::castToArrayKeyType()`, `Type::toArrayKey()` instead
238238
* Remove `UnionType::pickTypes()`, use `pickFromTypes()` instead
239+
* Remove `RegexArrayShapeMatcher::matchType()`, use `matchExpr()` instead

src/Type/Php/RegexArrayShapeMatcher.php

-8
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,6 @@ public function matchExpr(Expr $patternExpr, ?Type $flagsType, TrinaryLogic $was
6060
return $this->matchPatternType($this->getPatternType($patternExpr, $scope), $flagsType, $wasMatched, false);
6161
}
6262

63-
/**
64-
* @deprecated use matchExpr() instead for a more precise result
65-
*/
66-
public function matchType(Type $patternType, ?Type $flagsType, TrinaryLogic $wasMatched): ?Type
67-
{
68-
return $this->matchPatternType($patternType, $flagsType, $wasMatched, false);
69-
}
70-
7163
private function matchPatternType(Type $patternType, ?Type $flagsType, TrinaryLogic $wasMatched, bool $matchesAll): ?Type
7264
{
7365
if ($wasMatched->no()) {

0 commit comments

Comments
 (0)