File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
rules-tests/CodeQuality/Rector/ClassMethod/BehatPHPUnitAssertToWebmozartRector/Fixture
rules/PHPUnit80/Rector/MethodCall Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 99use PhpParser \Node \Expr \MethodCall ;
1010use PhpParser \Node \Expr \StaticCall ;
1111use PhpParser \Node \Identifier ;
12- use PHPStan \Type \StringType ;
13- use PHPStan \Type \UnionType ;
12+ use PHPStan \Type \TypeCombinator ;
1413use Rector \PHPUnit \NodeAnalyzer \TestsNodeAnalyzer ;
1514use Rector \Rector \AbstractRector ;
1615use 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}
You can’t perform that action at this time.
0 commit comments