From 9684604dab633b621794b1048b77dbf3936c7b65 Mon Sep 17 00:00:00 2001 From: bjorn Date: Tue, 21 Nov 2023 10:17:45 +0100 Subject: [PATCH] Fix style --- .../Class_/FunctionalTestDefaultThemePropertyRector.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Rector/Class_/FunctionalTestDefaultThemePropertyRector.php b/src/Rector/Class_/FunctionalTestDefaultThemePropertyRector.php index aeba2ead..05e0529c 100644 --- a/src/Rector/Class_/FunctionalTestDefaultThemePropertyRector.php +++ b/src/Rector/Class_/FunctionalTestDefaultThemePropertyRector.php @@ -8,7 +8,6 @@ use PhpParser\Builder\Property; use PhpParser\Node; use PHPStan\Analyser\Scope; -use PHPStan\Reflection\Php\PhpPropertyReflection; use PHPStan\Type\ObjectType; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\Core\Exception\ShouldNotHappenException; @@ -78,7 +77,7 @@ public function refactorWithScope(Node $node, Scope $scope): ?Node } $type = $this->nodeTypeResolver->getType($node); - if(count($type->getObjectClassNames()) === 0 || !$type->isObject()->yes()) { + if (count($type->getObjectClassNames()) === 0 || !$type->isObject()->yes()) { return null; } @@ -102,7 +101,6 @@ public function refactorWithScope(Node $node, Scope $scope): ?Node $betterReflection = $reflectionProperty->getBetterReflection(); $defaultValueExpression = $betterReflection->getDefaultValueExpression(); - if ($defaultValueExpression instanceof Node\Scalar\String_ && strlen($this->valueResolver->getValue($defaultValueExpression)) > 0) { return null; }