Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.26 KB

phpdoc_order_by_value.rst

File metadata and controls

68 lines (48 loc) · 1.26 KB

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', 'mixin', 'property', 'property-read', 'property-write', 'requires', 'throws', 'uses']

Default value: ['covers']

Examples

Example #1

Default configuration.

--- Original
+++ New
 <?php
 /**
+ * @covers Bar
  * @covers Foo
- * @covers Bar
  */
 final class MyTest extends \PHPUnit_Framework_TestCase
 {}

Example #2

With configuration: ['annotations' => ['author']].

--- Original
+++ New
 <?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:

Source class

PhpCsFixer\Fixer\Phpdoc\PhpdocOrderByValueFixer