thetomnewton / laravel-docblocks-php-cs-fixer
Laravel docblocks package for PHP-CS-Fixer
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
Installs: 207
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/thetomnewton/laravel-docblocks-php-cs-fixer
Requires
- php: ^7.4|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.6
- phpunit/phpunit: ^9.0
README
This package will help you get consistent Laravel-style docblocks with PHP-CS-Fixer
Installation
You can install the package via composer:
composer require thetomnewton/laravel-docblocks-php-cs-fixer
Of course, you will also need the PHP-CS-Fixer package installed.
Usage
In your .php-cs-fixer.php, add the custom fixer to your config class, like so:
return (new Config) ->setFinder($finder) ->registerCustomFixers([ new \Thetomnewton\LaravelDocFixer\LaravelDocblocks, ]) ->setRules($rules);
Then in your list of rules, add the following line:
$rules = [ // ... 'LaravelDocblocks/laravel_style_docs' => true, // ... ];
Job done! To give this a try:
./vendor/bin/php-cs-fixer fix -vvv --show-progress=dots
Security
If you discover any security related issues, please email tom@tomn.dev instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.