capsulescodes/laravel-flint

A Laravel-based PHP code style fixer for near-minimalists.

v0.1.0 2024-06-20 09:13 UTC

This package is auto-updated.

Last update: 2024-09-01 17:21:15 UTC


README

Laravel Flint

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.


Credits


License

MIT