Skip to content

Commit 8e0558f

Browse files
committed
[ci-review] Rector Rectify
1 parent aa933c5 commit 8e0558f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

rules/Unambiguous/Rector/Expression/FluentSettersToStandaloneCallMethodRector.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Rector\Unambiguous\Rector\Expression;
66

7+
use PHPStan\Type\ObjectType;
78
use PhpParser\Node;
89
use PhpParser\Node\Expr;
910
use PhpParser\Node\Expr\Assign;
@@ -145,10 +146,10 @@ private function resolveVariableName(Expr $expr): string
145146
private function shouldSkipForVendorOrInternal(Expr|MethodCall|null $firstMethodCall): bool
146147
{
147148
$callerType = $this->getType($firstMethodCall);
148-
if ($callerType instanceof \PHPStan\Type\ObjectType) {
149+
if ($callerType instanceof ObjectType) {
149150
$fileName = $callerType->getClassReflection()
150151
->getFileName();
151-
if ($fileName === false || str_contains($fileName, 'vendor')) {
152+
if (str_contains((string) $fileName, 'vendor')) {
152153
return true;
153154
}
154155
}

0 commit comments

Comments
 (0)