Skip to content

is_float() replaced with is_real() #1724

@holtkamp

Description

@holtkamp
Subject Details
PHP version PHP 7.3.7
Full Command ./vendor/bin/rector process src --level php74 --debug

Current Behaviour

is_float() is replaced with is_real()

    ---------- begin diff ----------

-            'fixed-base-price' => is_float($this->fixedBasePrice) ? (string) $this->fixedBasePrice : $this->fixedBasePrice,
+            'fixed-base-price' => is_real($this->fixedBasePrice) ? (string) $this->fixedBasePrice : $this->fixedBasePrice,

    ----------- end diff -----------

Applied rectors:

 * Rector\Rector\Function_\RenameFunctionRector

Minimal PHP Code Causing Issue

Just use a is_float()

Expected Behaviour

No replacements should be done for is_float().

is_real() SHOULD be replaced with is_float()

Probably caused by: https://github.com/rectorphp/rector/pull/905/files#r302064547
Also see: https://wiki.php.net/rfc/deprecations_php_7_4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions