Skip to content

Commit

Permalink
Enable rule (#2619)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
TomasVotruba and actions-user committed Jul 3, 2022
1 parent 45c91eb commit 39a6ed5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config/set/early-return.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
PreparedValueToEarlyReturnRector::class,
ReturnBinaryOrToEarlyReturnRector::class,
ReturnEarlyIfVariableRector::class,
// RemoveJustVariableAssignRector::class,
RemoveJustVariableAssignRector::class,
]);
};
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/Application/FileProcessor/PhpFileProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
3 changes: 1 addition & 2 deletions src/PhpParser/Node/NodeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 39a6ed5

Please sign in to comment.