diff --git a/config/set/early-return.php b/config/set/early-return.php index aaacca560ac..ca0c461010b 100644 --- a/config/set/early-return.php +++ b/config/set/early-return.php @@ -31,6 +31,6 @@ PreparedValueToEarlyReturnRector::class, ReturnBinaryOrToEarlyReturnRector::class, ReturnEarlyIfVariableRector::class, - // RemoveJustVariableAssignRector::class, + RemoveJustVariableAssignRector::class, ]); }; diff --git a/packages/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php b/packages/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php index bf1ba033878..8c6f34b0300 100644 --- a/packages/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php +++ b/packages/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php @@ -67,8 +67,7 @@ public function enterNode(Node $node): ?Node } $identifier = clone $node; - $namespacedName = $this->resolveNamespacedName($identifier, $phpParserNode, $node->name); - $identifier->name = $namespacedName; + $identifier->name = $this->resolveNamespacedName($identifier, $phpParserNode, $node->name); $staticType = $this->staticTypeMapper->mapPHPStanPhpDocTypeNodeToPHPStanType($identifier, $phpParserNode); // make sure to compare FQNs diff --git a/rules/Transform/Rector/Assign/PropertyFetchToMethodCallRector.php b/rules/Transform/Rector/Assign/PropertyFetchToMethodCallRector.php index b93b3d8e348..eff7ea31d3d 100644 --- a/rules/Transform/Rector/Assign/PropertyFetchToMethodCallRector.php +++ b/rules/Transform/Rector/Assign/PropertyFetchToMethodCallRector.php @@ -122,8 +122,7 @@ private function processGetter(PropertyFetch $propertyFetch): ?Node ); if ($propertyToMethodCall->getNewGetArguments() !== []) { - $args = $this->nodeFactory->createArgs($propertyToMethodCall->getNewGetArguments()); - $methodCall->args = $args; + $methodCall->args = $this->nodeFactory->createArgs($propertyToMethodCall->getNewGetArguments()); } return $methodCall; diff --git a/src/Application/FileProcessor/PhpFileProcessor.php b/src/Application/FileProcessor/PhpFileProcessor.php index fcab0a0cc9c..20bd10570c7 100644 --- a/src/Application/FileProcessor/PhpFileProcessor.php +++ b/src/Application/FileProcessor/PhpFileProcessor.php @@ -166,8 +166,7 @@ private function notifyFile(File $file): void } $smartFileInfo = $file->getSmartFileInfo(); - $relativeFilePath = $smartFileInfo->getRelativeFilePathFromDirectory(getcwd()); - $message = $relativeFilePath; + $message = $smartFileInfo->getRelativeFilePathFromDirectory(getcwd()); $this->rectorOutputStyle->writeln($message); } } diff --git a/src/PhpParser/Node/NodeFactory.php b/src/PhpParser/Node/NodeFactory.php index b3a5516270c..bd1a8aeb169 100644 --- a/src/PhpParser/Node/NodeFactory.php +++ b/src/PhpParser/Node/NodeFactory.php @@ -598,8 +598,7 @@ private function createParamWithType(Variable $variable, Type $type): Param { $param = new Param($variable); - $phpParserTypeNode = $this->staticTypeMapper->mapPHPStanTypeToPhpParserNode($type, TypeKind::PARAM); - $param->type = $phpParserTypeNode; + $param->type = $this->staticTypeMapper->mapPHPStanTypeToPhpParserNode($type, TypeKind::PARAM); return $param; }