# Bug Report <!-- First, thank you for reporting a bug. That takes time and we appreciate that! --> | Subject | Details | | :------------- | :--------------------| | Rector version | last dev-main | | Installed as | composer dependency | ## Minimal PHP Code Causing Issue See https://getrector.com/demo/d41fab65-6532-483d-a019-b82beac55caa ```php <?php final class DemoFile { public function example(): array { $value = 42; return get_defined_vars(); } } ``` ### Responsible rules * `RemoveUnusedVariableAssignRector` ## Expected Behavior Variable should not be removed because of the `get_defined_vars()`