Provides some helpful, opinionated PHP-CS-Fixer rules aimed at normalizing code.
Currently, the only rule included is wrap_block_comments
.
To use these rules, run:
composer require --dev commonground/phpcs-rules
Then add the following to your .php-cs-fixer.dist.php
:
require("vendor/autoload.php"); // if not already present
$cfg->registerCustomFixers([
new \CommonGround\PhpCsFixer\WrapBlockCommentFixer(),
]);
wrap_block_comments
wraps multi-line block comments (including docblocks)) to a
configurable maximum line length, defaulting to 80 columns. See the doc comments
for this fixer for details.
The CommonGround PHP-CS-Fixer rules, as with all Common Ground components, are MIT licensed. See LICENSE for the full text.