Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

format/phpdoc

PHPDoc blocks and tags. Also in lint (14) and analyse (32).

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

PHPDoc annotation descriptions should not be a sentence.

Not in any preset. Safe fix.

indent

Docblocks should have the same indentation as the documented subject.

In the format-laravel preset. Safe fix.

inline-tag

Fixes PHPDoc inline tags.

In the format-laravel preset. Safe fix.

line-span

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

Not in any preset. Safe fix.

no-alias-tag

No alias PHPDoc tags should be used.

Not in any preset. Safe fix.

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

Removes duplicate PHPDoc types.

Not in any preset. Safe fix.

no-empty

There should not be empty PHPDoc blocks.

In the format-laravel preset. Safe fix.

order

Annotations in PHPDoc should be ordered in defined sequence.

In the format-laravel preset. Safe fix.

order-by-value

Order PHPDoc tags by value.

Not in any preset. Safe fix.

param-order

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

Not in any preset. Safe fix.

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

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

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

Single line @var PHPDoc should have proper spacing.

In the format-laravel preset. Safe fix.

summary

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

Not in any preset. Safe fix.

tag-casing

Fixes casing of PHPDoc tags.

Not in any preset. Safe fix.

tag-type

Forces PHPDoc tags to be either regular annotations or inline.

In the format-laravel preset. Safe fix.

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

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

Not in any preset. Safe fix.

types

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

In the format-laravel preset. Safe fix.

types-order

Sorts PHPDoc types.

Not in any preset. Safe fix.

var-order

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

Not in any preset. Safe fix.

var-without-name

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

In the format-laravel preset. Safe fix.

Last updated on

Was this page helpful?