Skip to content

System error: "Rector\DeadCode\ConditionResolver::resolveArgumentValue(): Return value must be of type ?int, float returned" #9820

Description

@ziegenberg

Bug Report

Subject Details
Rector version ff8b25

Minimal PHP Code Causing Issue

https://getrector.com/demo/fd6ffcf5-7c7f-420e-91ec-3257a6ad5705

Expected Behaviour

Rector should also handle type juggling floats to string.

$result = version_compare(PHP_VERSION, 7.3, '>=') ? "yay" : "nay";

The second argument to version_compare is type converted from float to string.

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