Skip to content

Rector is trying to remove brackets from an if statement has has a nullable #8963

@xPaw

Description

@xPaw

Bug Report

Subject Details
Rector version Rector 2.0.6

See the demo code, it only does this when comparing against a variable, but not a const string.

Rector doesn't report that any rules are being applied.

Minimal PHP Code Causing Issue

https://getrector.com/demo/977084d2-3b53-4364-b50e-d0b7d7cabbf7

Expected Behaviour

No code changes.

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