---
title: "lint/phpdoc"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

PHPDoc blocks and tags. Also in [format](/docs/rules/format/phpdoc) (25) and [analyse](/docs/rules/analyse/phpdoc) (32).

**[add-missing-param](/docs/rules/lint/phpdoc/add-missing-param)**

PHPDoc should contain `@param` for all params.

In the `coding-style` set. Safe fix.

**[no-access](/docs/rules/lint/phpdoc/no-access)**

`@access` annotations must be removed from PHPDoc.

In the `coding-style` set. Safe fix.

**[no-empty-return](/docs/rules/lint/phpdoc/no-empty-return)**

`@return void` and `@return null` annotations must be removed from PHPDoc.

In the `coding-style` set. Safe fix.

**[no-misplaced](/docs/rules/lint/phpdoc/no-misplaced)**

Docblocks should only be used on structural elements.

In the `coding-style` set. Safe fix.

**[no-mixed-overruled-by-native](/docs/rules/lint/phpdoc/no-mixed-overruled-by-native)**

Remove @param mixed and @return mixed docblock that duplicates an already declared native type

In the `dead-code` set. Safe fix.

**[no-package](/docs/rules/lint/phpdoc/no-package)**

`@package` and `@subpackage` annotations must be removed from PHPDoc.

In the `coding-style` set. Safe fix.

**[no-superfluous-tags](/docs/rules/lint/phpdoc/no-superfluous-tags)**

Removes `@param`, `@return` and `@var` tags that don't provide any useful information.

In the `dead-code` set. Safe fix.

**[no-useless-inheritdoc](/docs/rules/lint/phpdoc/no-useless-inheritdoc)**

Classy that does not inherit must not have `@inheritdoc` tags.

In the `coding-style` set. Safe fix.

**[no-useless-param](/docs/rules/lint/phpdoc/no-useless-param)**

Remove @param docblock with same type as parameter type

In the `dead-code` set. Safe fix.

**[no-useless-readonly](/docs/rules/lint/phpdoc/no-useless-readonly)**

Remove useless `@readonly` annotation on native readonly type

In the `dead-code` set. Safe fix.

**[no-useless-return](/docs/rules/lint/phpdoc/no-useless-return)**

Remove @return docblock with same type as defined in PHP

In the `dead-code` set. Safe fix.

**[no-useless-var](/docs/rules/lint/phpdoc/no-useless-var)**

Remove unused `@var` annotation for properties and class constants

In the `dead-code` set. Safe fix.

**[no-void-on-magic-method](/docs/rules/lint/phpdoc/no-void-on-magic-method)**

Remove useless @return void docblock from magic methods __construct, __destruct, and __clone

In the `dead-code` set. Safe fix.

**[require-no-named-arguments](/docs/rules/lint/phpdoc/require-no-named-arguments)**

There must be `@no-named-arguments` tag in PHPDoc of a class/enum/interface/trait.

Not in any set. Safe fix.
