#103177Inconsistent behavior in MathUtility::canBeInterpretedAsInteger() for boolean values
Description
The behavior of MathUtility::canBeInterpretedAsInteger() is inconsistent:
var_dump(MathUtility::canBeInterpretedAsInteger(true)); // true var_dump(MathUtility::canBeInterpretedAsInteger(false)); // false
Assuming that the common true = 1, false = 0 logic applies, the behavior should be fixed to accept both boolean values. Both can be coerced into integers and thus interpreted a such:
var_dump(MathUtility::canBeInterpretedAsInteger(true)); // true var_dump(MathUtility::canBeInterpretedAsInteger(false)); // true
Alternatively both boolean values should be rejected for consistency:
var_dump(MathUtility::canBeInterpretedAsInteger(true)); // false var_dump(MathUtility::canBeInterpretedAsInteger(false)); // false