krowinski/bcmath-extended

Consistent type hints

TheLevti opened this issue · 2 comments

All public methods should have consistent parameter type hints. I guess it should be int|float|string. Some methods are missing this doc block type hints and because of this, editors and static code analyzers are complaining/marking uses with warnings/errors.

Please also check that all public methods have a correct return type hint.

Please provide the following details.

  • Operating System: any
  • PHP Version: any

Steps required to reproduce the problem.

  1. Use any static code analyzer or editor with intelisense.
  2. Try to pass to different functions different numeric types.

Expected Result.

  • No errors/warnings etc.

Actual Result.

  • Errors/warnings etc. about type miss match.

Hi @TheLevti, thank you for your reply.

This is good because the code hinting is important.

I think we can follow the phpDocumentor style to write comment annotations.

changed in #32