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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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