Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Do not require DocBlock for typed class attributes #404

Copy link
Copy link
Open
@aligent-lturner

Description

@aligent-lturner
Issue body actions

Description

Do not require a DocBlock for typed class attributes

Expected behavior

Class attributes that have specified types should not require a DocBlock. When an attribute already has a type, the DocBlock is providing no new information, and is instead just creating noise - e.g.:

/** @var ProductRepositoryInterface */
private ProductRepositoryInterface $productRepository;

We already have the type information - we don't need the DocBlock to tell us the type.

I propose that the rule regarding class attributes requiring a @var annotation with a type be changed so that it only applies to attributes without a specified type.

Benefits

Removes the need for redundant comments

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.