Fork me on GitHub
a Sensio Labs Product

I ate three cookies πŸͺ (v3.40.2) 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' and null

Default value: 'multi'

methodΒΆ

Whether method doc blocks should be single or multi line.

Allowed values: 'multi', 'single' and null

Default value: 'multi'

propertyΒΆ

Whether property doc blocks should be single or multi line.

Allowed values: 'multi', 'single' and null

Default value: 'multi'

ExamplesΒΆ

Example #1ΒΆ

Default configuration.

--- Original
+++ New
 <?php

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

Example #2ΒΆ

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

--- Original
+++ New
 <?php

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

Source classΒΆ

PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer