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

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

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

**[align](/docs/rules/format/phpdoc/align)**

All items of the given PHPDoc tags must be either left-aligned or (by default) aligned vertically.

In the `format-laravel` preset. Safe fix.

**[annotation-without-dot](/docs/rules/format/phpdoc/annotation-without-dot)**

PHPDoc annotation descriptions should not be a sentence.

Not in any preset. Safe fix.

**[indent](/docs/rules/format/phpdoc/indent)**

Docblocks should have the same indentation as the documented subject.

In the `format-laravel` preset. Safe fix.

**[inline-tag](/docs/rules/format/phpdoc/inline-tag)**

Fixes PHPDoc inline tags.

In the `format-laravel` preset. Safe fix.

**[line-span](/docs/rules/format/phpdoc/line-span)**

Changes doc blocks from single to multi line, or reversed.

Not in any preset. Safe fix.

**[no-alias-tag](/docs/rules/format/phpdoc/no-alias-tag)**

No alias PHPDoc tags should be used.

Not in any preset. Safe fix.

**[no-blank-line-after](/docs/rules/format/phpdoc/no-blank-line-after)**

There should not be blank lines between docblock and the documented element.

In the `format-laravel` preset. Safe fix.

**[no-duplicate-types](/docs/rules/format/phpdoc/no-duplicate-types)**

Removes duplicate PHPDoc types.

Not in any preset. Safe fix.

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

There should not be empty PHPDoc blocks.

In the `format-laravel` preset. Safe fix.

**[order](/docs/rules/format/phpdoc/order)**

Annotations in PHPDoc should be ordered in defined sequence.

In the `format-laravel` preset. Safe fix.

**[order-by-value](/docs/rules/format/phpdoc/order-by-value)**

Order PHPDoc tags by value.

Not in any preset. Safe fix.

**[param-order](/docs/rules/format/phpdoc/param-order)**

Orders all `@param` annotations in DocBlocks according to method signature.

Not in any preset. Safe fix.

**[return-self-reference](/docs/rules/format/phpdoc/return-self-reference)**

The type of `@return` annotations of methods returning a reference to itself must the configured one.

Not in any preset. Safe fix.

**[scalar](/docs/rules/format/phpdoc/scalar)**

Scalar types should always be written in the same form. `int` not `integer`, `bool` not `boolean`, `float` not `real` or `double`.

In the `format-laravel` preset. Safe fix.

**[separation](/docs/rules/format/phpdoc/separation)**

Annotations in PHPDoc should be grouped together so that annotations of the same type immediately follow each other. Annotations of a different type are separated by a single blank line.

In the `format-laravel` preset. Safe fix.

**[single-line-var-spacing](/docs/rules/format/phpdoc/single-line-var-spacing)**

Single line `@var` PHPDoc should have proper spacing.

In the `format-laravel` preset. Safe fix.

**[summary](/docs/rules/format/phpdoc/summary)**

PHPDoc summary should end in either a full stop, exclamation mark, or question mark.

Not in any preset. Safe fix.

**[tag-casing](/docs/rules/format/phpdoc/tag-casing)**

Fixes casing of PHPDoc tags.

Not in any preset. Safe fix.

**[tag-type](/docs/rules/format/phpdoc/tag-type)**

Forces PHPDoc tags to be either regular annotations or inline.

In the `format-laravel` preset. Safe fix.

**[trim](/docs/rules/format/phpdoc/trim)**

PHPDoc should start and end with content, excluding the very first and last line of the docblocks.

In the `format-laravel` preset. Safe fix.

**[trim-blank-lines](/docs/rules/format/phpdoc/trim-blank-lines)**

Removes extra blank lines after summary and after description in PHPDoc.

Not in any preset. Safe fix.

**[types](/docs/rules/format/phpdoc/types)**

The correct case must be used for standard PHP types in PHPDoc.

In the `format-laravel` preset. Safe fix.

**[types-order](/docs/rules/format/phpdoc/types-order)**

Sorts PHPDoc types.

Not in any preset. Safe fix.

**[var-order](/docs/rules/format/phpdoc/var-order)**

`@var` and `@type` annotations must have type and name in the correct order.

Not in any preset. Safe fix.

**[var-without-name](/docs/rules/format/phpdoc/var-without-name)**

`@var` and `@type` annotations of classy properties should not contain the name.

In the `format-laravel` preset. Safe fix.
