Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
274 stars 19 forks source link

Extract method expects foreach variables to be injected #405

Open Gert-dev opened 6 years ago

Gert-dev commented 6 years ago

When extracting this code:

foreach ($test as $value) {
    $value->foo();
}

Extract method tries to make $value a method parameter, whilst injecting it is not necessary. It is possible that the same happens for foreach loop keys.