
phpdoc_to_comment
¶Docblocks should only be used on structural elements.
ignored_tags
¶List of ignored tags (matched case insensitively)
Allowed types: array
Default value: []
Default configuration.
--- Original
+++ New
<?php
$first = true;// needed because by default first docblock is never fixed.
-/** This should be a comment */
+/* This should be a comment */
foreach($connections as $key => $sqlite) {
$sqlite->open($path);
}
With configuration: ['ignored_tags' => ['todo']]
.
--- Original
+++ New
<?php
$first = true;// needed because by default first docblock is never fixed.
-/** This should be a comment */
+/* This should be a comment */
foreach($connections as $key => $sqlite) {
$sqlite->open($path);
}
/** @todo This should be a PHPDoc as the tag is on "ignored_tags" list */
foreach($connections as $key => $sqlite) {
$sqlite->open($path);
}
The rule is part of the following rule sets:
Using the @PhpCsFixer rule set will enable the phpdoc_to_comment
rule with the default config.
Using the @Symfony rule set will enable the phpdoc_to_comment
rule with the default config.