Skip to content

ArrayKeysAndInArrayToArrayKeyExistsRector revmoves variables that are used later #7699

@sreichel

Description

@sreichel

Bug Report

Subject Details
Rector version 0.15.2
Rule ArrayKeysAndInArrayToArrayKeyExistsRector

Variables that are used later are ignored.

For example below phpstan now complains about ...

249    Undefined variable: $tableAliases                

Minimal PHP Code Causing Issue

https://getrector.org/demo/85d78e6e-df97-485e-9412-e90550777ee5

Expected Behaviour

Skip it. (in this case)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions