Skip to content

allow BcMath\Number in forbidArithmeticOperationOnNonNumber rule #320

@JokubasR

Description

@JokubasR

BcMath\Number class is a class for an arbitrary precision number. These objects support overloaded arithmetic and comparison operators.

https://www.php.net/manual/en/class.bcmath-number.php

Would it be possible to support the BcMath\Number objects in a forbidArithmeticOperationOnNonNumber rule?
Arithmetic between BcMath\Number and BcMath\Number or int is supported. BcMath\Number and float give a deprecation warning (https://wiki.php.net/rfc/implicit-float-int-deprecate)

I could try to implement this addition to the rule and provide the PR if there will be any support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions