carthage-software/mago
Mago is an extremely fast PHP linter, formatter, and static analyzer written in Rust. It brings Rust-inspired speed and reliability to PHP projects with a modern toolchain and great developer experience, plus multiple install options (script, Homebrew, Composer).
The mago lint command is the entry point for running the linter.
To lint all the source files defined in your mago.toml configuration, simply run:
mago lint
Mago will scan your project in parallel and report any issues it finds.
Many lint rules provide automatic fixes. To apply them, use the --fix flag:
mago lint --fix
This will modify your files in place. To see what changes would be made without applying them, you can combine it with --dry-run:
mago lint --fix --dry-run
If you want to run only a specific set of rules, use the --only flag. This is great for incrementally introducing new rules to a project.
# Run only these two rules
mago lint --only no-empty,use-compound-assignment
For more details on the available command-line options, see the Command Reference.
How can I help you explore Laravel packages today?