Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent type hints #30

Closed
TheLevti opened this issue Apr 21, 2019 · 2 comments
Closed

Consistent type hints #30

TheLevti opened this issue Apr 21, 2019 · 2 comments
Assignees

Comments

@TheLevti
Copy link

TheLevti commented Apr 21, 2019

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.
@peter279k
Copy link
Contributor

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.

@krowinski krowinski self-assigned this Apr 22, 2019
krowinski added a commit that referenced this issue May 1, 2019
* added support for php 7.1 >= (#31, #30  ) 
* bcdiv will throw exception if you will try to make division by zero
* all result have trailing zero removed
@krowinski
Copy link
Owner

changed in #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants