php-ide-serenata icon indicating copy to clipboard operation
php-ide-serenata copied to clipboard

Extract method expects foreach variables to be injected

Open Gert-dev opened this issue 7 years ago • 0 comments

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.

Gert-dev avatar May 04 '18 19:05 Gert-dev