Skip to content

MissingParameterTypeHint vs UselessDocComment #2

@RosiersRobin

Description

@RosiersRobin

Using the rule SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint conflicts with rule SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessDocComment.

Given error when no comment placed:
Method \App\Entity\BillonlineQuote::nameQuoteID() does not have parameter type hint nor @param annotation for its parameter $quoteID.

Warning given when the comment is placed (requested by the previous error)
Method \App\Entity\BillonlineQuote::nameQuoteID() does not need documentation comment. (SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessDocComment)

public function nameQuoteID($quoteID) : void
{
    $this->quoteID = $quoteID;
}

Docblock used

/**
* @param int $quoteID
*/

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