Download the PHP package matthewnance/laravel-php-cs-fixer without Composer
On this page you can find all versions of the php package matthewnance/laravel-php-cs-fixer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download matthewnance/laravel-php-cs-fixer
More information about matthewnance/laravel-php-cs-fixer
Files in matthewnance/laravel-php-cs-fixer
Package laravel-php-cs-fixer
Short Description Laravel wrapper for enforcing proper php coding standards.
License MIT
Informations about the package laravel-php-cs-fixer
Laravel PHP CS Fixer
The PHP CS Fixer is maintained on GitHub at https://github.com/FriendsOfPHP/PHP-CS-Fixer bug reports and ideas about new features are welcome there.
The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP coding standards as defined in the PSR-1, PSR-2, etc., or other community driven ones like the Symfony one. You can also define your (teams) style through configuration.
This package makes it easier than ever to use PHP CS Fixer to maintain your laravel code by providing access to it via tools that you are already familiar with. An artisan command to fix the code, and manage the configuration the way you do all the other laravel packages you use.
Features of this package
- Run PHP-CS-Fixer commands via Laravel Artisan CLI.
- Laravel Code Style Configuration Used by Default.
- No need to learn a new tool.
Versions and compatibility
Note: This documentation was written for Laravel 5.5.
- PHP Version: ">=7.0 <7.3"
- Laravel/Lumen: "5.4.x|5.5.x"
- PHP-CS-Fixer: "2.13.*"
Installation
Register the Provider:
For Lumen services, add:
to bootstrap/app.php
. For Laravel applications, add:
to the providers
array in config/app.php
.
Configuration
The default rule configuration is in the fixer.php
and is intended to match the rules used by the Laravel Framework.
if you want to modify this yourself, just use artisan artisan vendor:publish --provider="MatthewNance\Fixer\FixerServiceProvider"
and it will put the default configuration in 'config/fixer.php'. Check the
PHP-CS-Fixer/README for valid rules.
Note: There are some static configuration settings in the finder that have yet to be moved to the configuration file that you should be aware of! We plan to move these to the config file soon.
Usage
Fix Your Code
Fix your code with Laravel Coding Standards.
Syntax:
Example:
All versions of laravel-php-cs-fixer with dependencies
illuminate/support Version 5.4.x|5.5.x|5.6.x
friendsofphp/php-cs-fixer Version 2.13.*