Skip to content

PHPDoc return types incorrect/outdated #30

Open
@Synchro

Description

@Synchro

Bug Report

Q A
Version(s) dev-master (currently 2.14.x)

Summary

Return types declared in phpdocs are often incorrect, probably because they are outdated.

For example, in laminas-feed/src/Reader/Entry/Rss.php the getEnclosure() method is declared as:

@return string

when it actually returns a stdClass instance. This is enough to trip up most IDEs and static analysers. I think in this particular case it used to return an array instead of a stdClass, but string is wrong for that too.

There are many examples of this, and it probably applies to other components too. Because it's so widespread, I didn't want to do a PR on spec in case you have some policy on such phpdocs, but I wanted to flag it anyway.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions