Skip to content

Incorrect behavior of SimplifyConditionsRector #9789

Description

@j-dobr

Bug Report

Subject Details
Rector version last dev-main
Installed as composer dependency

Minimal PHP Code Causing Issue

See https://getrector.com/demo/a87b8dde-e276-488c-83dc-d357bd5845d6

<?php

if (! (1 < (1 ? 2 : 1))) {
}

Responsible rules

  • SimplifyConditionsRector

Expected Behavior

<?php

if (1 >= (1 ? 2 : 1)) {
}

Failing fixture

Pull request with failing test for this rectorphp/rector-src#8121

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions