adamwojs / php-cs-fixer-one-line-var-phpdoc
Installs: 816
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/adamwojs/php-cs-fixer-one-line-var-phpdoc
Requires
- php: ^7.1
- friendsofphp/php-cs-fixer: ^2.7
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is not auto-updated.
Last update: 2025-10-06 20:45:25 UTC
README
php-cs-fixer rule to force using Single line @var phpdoc if no additional description provided.
Usage
In your .php_cs file:
<?php // PHP-CS-Fixer 2.x syntax return PhpCsFixer\Config::create() // (1) Register \AdamWojs\PhpCsFixerSingleLineVarPhpdoc\Fixer\Phpdoc\SingleLineVarPhpDocFixer fixer ->registerCustomFixers([ new \AdamWojs\PhpCsFixerSingleLineVarPhpdoc\Fixer\Phpdoc\SingleLineVarPhpDocFixer(), ]) ->setRules([ // ... // (2) Enable AdamWojs/phpdoc_force_single_line_var rule 'AdamWojs/phpdoc_force_single_line_var' => true, ]) // ... ;