bitvalencia / laravel-style-rules
This package is abandoned and no longer maintained.
No replacement package was suggested.
Laravel style rules for PHP-CS-Fixer
Package info
github.com/bitvalencia/laravel-style-rules
pkg:composer/bitvalencia/laravel-style-rules
1.0.0
2020-07-05 23:06 UTC
Requires
- php: ^7.2
- friendsofphp/php-cs-fixer: ^2.8
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
These are the rules applied across all our projects.
Installation
You can install using composer from Packagist.
composer require bitvalencia/laravel-style-rules --dev
Usage
In your .php_cs config file
<?php // specify the paths to fix $finder = PhpCsFixer\Finder::create() ->notPath('bootstrap/*') ->notPath('storage/*') ->notPath('vendor') ->in([ __DIR__ . '/app', __DIR__ . '/tests', __DIR__ . '/database', ]) ->name('*.php') ->notName('*.blade.php') ->ignoreDotFiles(true) ->ignoreVCS(true); // then call and return the following style function return BitValencia\style_rules($finder);
Running
Running the command
./vendor/bin/php-cs-fixer fix
Running in CI
./vendor/bin/php-cs-fixer fix --dry-run
Resources
- Sharing PHP-CS-Fixer rules across projects and teams. Laravel News Article
- Laravel Shift Recommended Coding Ruleset. Gist - Shift
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.