This project is focused in create the best set of rules for Laravel Pint.
Laravel Pint is an opinionated PHP code style fixer for minimalists. Pint is built on top of PHP-CS-Fixer and makes it simple to ensure that your code style stays clean and consistent.
- By default, the preset used is PER, a new and modern preset over the PSR12. But you can change to
laravel
,psr12
or evensymfony
. - This preset was chosen by my personal preference, you can use what ever you want.
- The set of rules applied in this configuration was chosen to a clean, organized and modern code.
Documentation for Pint can be found on the Laravel website. The project page on Github can be found here.
- Install Laravel Pint
composer require laravel/pint --dev
- In Laravel version 9.21 and newers, the package comes officially on new installations.
- Clone the project or download the file
pint.json
and place it in the root folder of your project.- If you want place the file in another folder, no problem. When you run the
pint
command, pass the argument like this--config the/path/to/pint.json
- If you want place the file in another folder, no problem. When you run the
- Run the command
./vendor/bin/pint
with or without arguments and DONE!
Laravel Pint require PHP 8.1 or higher.