123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- ==============================
- Rule ``phpdoc_order_by_value``
- ==============================
- Order phpdoc tags by value.
- Configuration
- -------------
- ``annotations``
- ~~~~~~~~~~~~~~~
- List of annotations to order, e.g. ``["covers"]``.
- Allowed values: a subset of ``['author', 'covers', 'coversNothing', 'dataProvider', 'depends', 'group', 'internal', 'method', 'property', 'property-read', 'property-write', 'requires', 'throws', 'uses']``
- Default value: ``['covers']``
- Examples
- --------
- Example #1
- ~~~~~~~~~~
- *Default* configuration.
- .. code-block:: diff
- --- Original
- +++ New
- @@ -1,7 +1,7 @@
- <?php
- /**
- + * @covers Bar
- * @covers Foo
- - * @covers Bar
- */
- final class MyTest extends \PHPUnit_Framework_TestCase
- {}
- Example #2
- ~~~~~~~~~~
- With configuration: ``['annotations' => ['author']]``.
- .. code-block:: diff
- --- Original
- +++ New
- @@ -1,7 +1,7 @@
- <?php
- /**
- + * @author Alice
- * @author Bob
- - * @author Alice
- */
- final class MyTest extends \PHPUnit_Framework_TestCase
- {}
- Rule sets
- ---------
- The rule is part of the following rule set:
- @PhpCsFixer
- Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``phpdoc_order_by_value`` rule with the default config.
|