Changes doc blocks from single to multi line, or reversed.
You can configure this rule using the following options: class, const,
method, other, property, trait_import.
Whether class/interface/enum/trait blocks should be single or multi line.
Allowed values: 'multi', 'single' and null
Default value: 'multi'
Whether const blocks should be single or multi line.
Allowed values: 'multi', 'single' and null
Default value: 'multi'
Whether method doc blocks should be single or multi line.
Allowed values: 'multi', 'single' and null
Default value: 'multi'
Whether blocks for other code lines should be single or multi line.
Allowed values: 'multi', 'single' and null
Default value: null
Whether property doc blocks should be single or multi line.
Allowed values: 'multi', 'single' and null
Default value: 'multi'
Whether trait usage blocks should be single or multi line.
Allowed values: 'multi', 'single' and null
Default value: null
Default configuration.
--- Original
+++ New
<?php
class Foo{
- /** @var bool */
+ /**
+ * @var bool
+ */
public $var;
}With configuration: ['property' => 'single'].
--- Original
+++ New
<?php
class Foo{
- /**
- * @var bool
- */
+ /** @var bool */
public $var;
}With configuration: ['other' => 'single'].
--- Original
+++ New
<?php
-/**
- * @var string
- */
+/** @var string */
$var = foo();- Fixer class: PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer
- Test class: PhpCsFixer\Tests\Fixer\Phpdoc\PhpdocLineSpanFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.