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

Fix return type of FileGenerator::getClass #2

Open
weierophinney opened this issue Dec 31, 2019 · 0 comments
Open

Fix return type of FileGenerator::getClass #2

weierophinney opened this issue Dec 31, 2019 · 0 comments

Comments

@weierophinney
Copy link
Member

Provide a narrative description of what you are trying to accomplish:

  • [Y ] Is this related to quality assurance?
    Return type of \Zend\Code\Generator\FileGenerator::getClass only has ClassGenerator while it can also return false when the classes array is empty.
    PHPStan will whine about this, because it should always return a true-thy return, also it gives the perception it will always return the ClassGenerator (while it doesn't always do that)

Therefor I added the false to the return type in the docblock.


Originally posted by @janvernieuwe at zendframework/zend-code#177

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

1 participant