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

Add PHPDoc method hints for allNullOrIs* #97

Closed
gskema opened this issue Apr 3, 2019 · 5 comments · Fixed by #214
Closed

Add PHPDoc method hints for allNullOrIs* #97

gskema opened this issue Apr 3, 2019 · 5 comments · Fixed by #214

Comments

@gskema
Copy link

gskema commented Apr 3, 2019

E.g. I used a Assert::allNullOrIsInstanceOf(...) in a __construct(), it's a valid function, but without a method PHPDoc. Is this intentional or should it be added?

@BackEndTea
Copy link
Collaborator

The 'downside' of the current implementation is that the all and nullOr can be chained for however long the user wishes. e.g. nullOrAllNullOrInstanceOf would also be valid. So that means there is technically an infinite number of methods to support.

And if we document allNullOr...then nullOrAll... should be documented as well

The reasons for having the @method anotations are IDE auto completion, and static analysis tools. I'd personally like to solve those through some kind of annotation on the __callStatic method, but i don't think there is anything like that atm.

For now this isn't something i'm to keen on fixing as it doubles the work for most things related to this project.

@guilliamxavier
Copy link
Contributor

BTW there was a PR proposed last year: #68

@gskema
Copy link
Author

gskema commented Jul 8, 2019

I understand, do whatever you think is appropriate. I just found these methods useful and wish they were documented (not seen as "undefined"). You can close this.

@zerkms
Copy link
Contributor

zerkms commented May 30, 2020

This will be closed after #126 is completed and merged.

@FrontEndCoffee
Copy link
Contributor

Shouldn't this be closed as #126 is merged?

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

Successfully merging a pull request may close this issue.

5 participants