capsulescodes / laravel-flint
A Laravel-based PHP code style fixer for near-minimalists.
v0.1.0
2024-06-20 09:13 UTC
Requires
- php: ^8.2.0
- ext-json: *
- ext-mbstring: *
- ext-tokenizer: *
- ext-xml: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.59.3
- illuminate/view: ^11.10.0
- laravel-zero/framework: ^11.0.1
- mockery/mockery: ^1.6.12
- nunomaduro/termwind: ^2.0.1
- pestphp/pest: ^2.34.8
README
Laravel Flint is a PHP code style fixer for near-minimalists based on Laravel Pint.
Flint is built on top of PHP-CS-Fixer and makes it simple to ensure that your code style stays clean and consistent.
Note
This is in active development. New features will be introduced gradually.
Features
Custom fixers
{
...
"rules" : {
...
"CapsulesCodes/method_chaining_indentation" : { "multi-line" : 4 },
"CapsulesCodes/multiple_lines_after_imports" : { "lines" : 2 },
"CapsulesCodes/spaces_inside_square_braces" : { "space" : "single" }
...
},
"fixers" : [ "CapsulesCodes\\Fixers" ]
...
}
Tip
namespaces
or imports
are functionnal
Empty preset
{
"preset" : "none",
...
}
Tip
the current presets are laravel
, none
, per
, psr12
and symfony
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
The main
branch is in sync with Laravel Pint. The fork
branch contains the new features.