===================== Rule ``phpdoc_order`` ===================== Annotations in PHPDoc should be ordered in defined sequence. Configuration ------------- ``order`` ~~~~~~~~~ Sequence in which annotations in PHPDoc should be ordered. Allowed types: ``list`` Default value: ``['param', 'throws', 'return']`` Examples -------- Example #1 ~~~~~~~~~~ *Default* configuration. .. code-block:: diff --- Original +++ New ['param', 'throws', 'return']]``. .. code-block:: diff --- Original +++ New ['param', 'return', 'throws']]``. .. code-block:: diff --- Original +++ New ['param', 'custom', 'throws', 'return']]``. .. code-block:: diff --- Original +++ New `_ with config: ``['order' => ['param', 'return', 'throws']]`` - `@Symfony <./../../ruleSets/Symfony.rst>`_ with config: ``['order' => ['param', 'return', 'throws']]`` References ---------- - Fixer class: `PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderFixer <./../../../src/Fixer/Phpdoc/PhpdocOrderFixer.php>`_ - Test class: `PhpCsFixer\\Tests\\Fixer\\Phpdoc\\PhpdocOrderFixerTest <./../../../tests/Fixer/Phpdoc/PhpdocOrderFixerTest.php>`_ The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.