Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 583 Bytes

phpdoc_param_order.rst

File metadata and controls

30 lines (24 loc) · 583 Bytes

Rule phpdoc_param_order

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

Examples

Example #1

--- Original
+++ New
 <?php
 /**
  * Annotations in wrong order
  *
  * @param int   $a
+ * @param array $b
  * @param Foo   $c
- * @param array $b
  */
 function m($a, array $b, Foo $c) {}

Source class

PhpCsFixer\Fixer\Phpdoc\PhpdocParamOrderFixer