UnusedVariableSniff detects anonymous class property as unused variable
mfb opened this issue · comments
mark burdett commented
Here $bar is considered an unused variable:
$foo = new class () {
public array $bar = [];
};
This also happens if I use the property in a method, by the way :)
Jaroslav Hanslík commented
@mfb I'm not able to reproduce it. Can you please prepare failing test?