Skip to content

Squiz.Commenting.FunctionComment.MissingReturn @inheritDoc not resolved? #2770

Closed
@kwhat

Description

@kwhat

Hi,

I have @inheritDoc as the docblock to one of my inherited methods. The parent method is documented correctly, however, Squiz.Commenting does not appear to inherit the doc-block.

    /**
     * @inheritDoc
     */
    public function __toString(): string { /* Child Class */ }
    /**
     * @throws DatabaseException
     *
     * @return string
     */
    public function __toString(): string { /* Parent Class */ }
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
 31 | ERROR | Missing @return tag in function comment
    |       | (Squiz.Commenting.FunctionComment.MissingReturn)
 31 | ERROR | Missing @throws tag in function comment
    |       | (Squiz.Commenting.FunctionCommentThrowTag.Missing)
----------------------------------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions