php-ide-serenata
php-ide-serenata copied to clipboard
Extract method expects foreach variables to be injected
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.