Fork me on GitHub
a Sensio Labs Product

I ate three cookies πŸͺ (v3.40.2) edition

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