-
-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
rectorphp/rector-src
#6046Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
When param name used as ArrowFunction param, it should be skipped.
See https://getrector.com/demo/14b8b5f1-05ee-4ecb-9d84-973ddc5297a4
<?php
use PhpParser\Node\Stmt\Foreach_;
use PhpParser\Node\Expr\Variable;
final class DemoFile
{
public function run(Foreach_ $node)
{
array_map(
fn (Variable $node)
=> $node,
[]
);
}
}Responsible rules
RenameParamToMatchTypeRector
Expected Behavior
Should be skipped, ref rectify error at rectorphp/rector-src@33ddf96
Reactions are currently unavailable