Fork me on GitHub
a Sensio Labs Product

Remote Void (v2.18.1) edition

Rule phpdoc_line_span

Changes doc blocks from single to multi line, or reversed. Works for class constants, properties and methods only.

Configuration

const

Whether const blocks should be single or multi line

Allowed values: 'multi', 'single'

Default value: 'multi'

property

Whether property doc blocks should be single or multi line

Allowed values: 'multi', 'single'

Default value: 'multi'

method

Whether method doc blocks should be single or multi line

Allowed values: 'multi', 'single'

Default value: 'multi'

Examples

Example #1

Default configuration.

--- Original
+++ New
@@ -1,6 +1,8 @@
 <?php

 class Foo{
-    /** @var bool */
+    /**
+     * @var bool
+     */
     public $var;
 }

Example #2

With configuration: ['property' => 'single'].

--- Original
+++ New
@@ -1,8 +1,6 @@
 <?php

 class Foo{
-    /**
-    * @var bool
-    */
+    /** @var bool */
     public $var;
 }
The logo is © 2010-2014 Sensio Labs