Review main Merged

73986[TASK] Add modern typing to MathUtility

crell CR +2 V +2 Normal +16 −36 updated 03/29/22, 18:07

Commit message

This patch add more explicit types to MathUtility.

Of particular note:

* isIntegerInRange(), despite its name, allows for non-ints and
  treats them as out-of-range. Types are setup to retain that
  behavior.
* convertToPositiveInteger() is the same behavior as a call to
  forceIntegerInRange() with a min of 0, thus changed to be that.
* calculateWithPriorityToAdditionAndSubtraction() was docblock
  typed to return an int, when in reality it's float|string. Both
  are changed to "float|string" rather than changing the behavior.
* Similarly, calculateWithParentheses()'s docblock changed to
  proper return type string instead of the incorrect int.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 3