diff --git a/src/Rector/ClassMethod/MakeModelAttributesAndScopesProtectedRector.php b/src/Rector/ClassMethod/MakeModelAttributesAndScopesProtectedRector.php index 07db13c7..0005999e 100644 --- a/src/Rector/ClassMethod/MakeModelAttributesAndScopesProtectedRector.php +++ b/src/Rector/ClassMethod/MakeModelAttributesAndScopesProtectedRector.php @@ -10,7 +10,6 @@ use PHPStan\Reflection\ClassReflection; use PHPStan\Type\ObjectType; use Rector\Php80\NodeAnalyzer\PhpAttributeAnalyzer; -use Rector\Php81\NodeManipulator\AttributeGroupNewLiner; use Rector\PHPStan\ScopeFetcher; use Rector\Privatization\NodeManipulator\VisibilityManipulator; use RectorLaravel\AbstractRector; @@ -24,8 +23,7 @@ class MakeModelAttributesAndScopesProtectedRector extends AbstractRector { public function __construct( private readonly VisibilityManipulator $visibilityManipulator, - private readonly PhpAttributeAnalyzer $phpAttributeAnalyzer, - private readonly AttributeGroupNewLiner $attributeGroupNewLiner, + private readonly PhpAttributeAnalyzer $phpAttributeAnalyzer ) {} public function getRuleDefinition(): RuleDefinition @@ -90,10 +88,6 @@ public function refactor(Node $node): ?Node $this->visibilityManipulator->makeProtected($node); - if ($node->attrGroups !== []) { - $this->attributeGroupNewLiner->newLine($this->file, $node); - } - return $node; } diff --git a/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php b/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php index faad85ef..8823fdbc 100644 --- a/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php +++ b/src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php @@ -113,7 +113,7 @@ private function handleBinaryOp(BinaryOp $binaryOp): array $methodCall = array_values( array_filter( [$binaryOp->left, $binaryOp->right], - fn ($node) => $this->validMethodCall($node), + $this->validMethodCall(...), ) )[0] ?? null;