rector
rector copied to clipboard
Remove -inline- unused variable assign
Feature Request
It would be great if there is a rule (or an upgrade of RemoveUnusedVariableAssignRector?) to also remove unused variables assigns if they are inline.
Diff
<?php
final class DemoFile
{
public function run(bool $param): array
{
$returnValue = [
- $innerValue = [
+ [
'ok',
],
];
- return $yes = $returnValue;
+ return $returnValue;
}
}