Each line of multi-line DocComments must have an asterisk [PSR-5] and must be aligned with the first one.
Whether to fix PHPDoc comments only (phpdocs_only), any multi-line comment
whose lines all start with an asterisk (phpdocs_like) or any multi-line
comment (all_multiline).
Allowed values: 'all_multiline', 'phpdocs_like' and 'phpdocs_only'
Default value: 'phpdocs_only'
Default configuration.
--- Original
+++ New
<?php
/**
- * This is a DOC Comment
-with a line not prefixed with asterisk
-
- */
+ * This is a DOC Comment
+ * with a line not prefixed with asterisk
+ *
+ */With configuration: ['comment_type' => 'phpdocs_like'].
--- Original
+++ New
<?php
/*
- * This is a doc-like multiline comment
-*/
+ * This is a doc-like multiline comment
+ */With configuration: ['comment_type' => 'all_multiline'].
--- Original
+++ New
<?php
/*
- * This is a doc-like multiline comment
+ * This is a doc-like multiline comment
with a line not prefixed with asterisk
- */
+ */The rule is part of the following rule sets:
- Fixer class: PhpCsFixer\Fixer\Phpdoc\AlignMultilineCommentFixer
- Test class: PhpCsFixer\Tests\Fixer\Phpdoc\AlignMultilineCommentFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.