Skip to content

Commit f9e9a7f

Browse files
committed
FIx
1 parent c29f771 commit f9e9a7f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

rules-tests/CodeQuality/Rector/ClassMethod/BehatPHPUnitAssertToWebmozartRector/Fixture/some_class.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class SomeClass implements Context
3030
{
3131
\Webmozart\Assert\Assert::same('given', 'expected');
3232

33-
\Webmozart\Assert\Assert::contains('needle', 'haystack');
33+
\Webmozart\Assert\Assert::contains('haystack', 'needle');
3434
}
3535
}
3636

rules/PHPUnit80/Rector/MethodCall/SpecificAssertContainsRector.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
use PhpParser\Node\Expr\MethodCall;
1010
use PhpParser\Node\Expr\StaticCall;
1111
use PhpParser\Node\Identifier;
12-
use PHPStan\Type\StringType;
13-
use PHPStan\Type\UnionType;
12+
use PHPStan\Type\TypeCombinator;
1413
use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer;
1514
use Rector\Rector\AbstractRector;
1615
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@@ -107,9 +106,10 @@ public function refactor(Node $node): ?Node
107106
private function isPossiblyStringType(Expr $expr): bool
108107
{
109108
$exprType = $this->getType($expr);
110-
$exprType = \PHPStan\Type\TypeCombinator::removeNull($exprType);
111-
$exprType = \PHPStan\Type\TypeCombinator::removeFalsey($exprType);
109+
$exprType = TypeCombinator::removeNull($exprType);
110+
$exprType = TypeCombinator::removeFalsey($exprType);
112111

113-
return $exprType->isString()->yes();
112+
return $exprType->isString()
113+
->yes();
114114
}
115115
}

0 commit comments

Comments
 (0)