Skip to content

Fix return type of FileGenerator::getClass #2

@weierophinney

Description

@weierophinney

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions