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

v0.0.3 2022-03-15 11:29 UTC

This package is auto-updated.

Last update: 2023-10-15 14:58:03 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

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.