carthage-software/mago
Mago is an extremely fast PHP linter, formatter, and static analyzer written in Rust. It helps teams catch issues early, enforce consistent style, and improve code quality across projects, with multiple install options like script, Homebrew, Composer, and Cargo.
+++ title = "格式化器" description = "格式化器的功能,以及它如何产出确定性输出。" nav_order = 10 nav_section = "工具" nav_subsection = "Formatter" +++
一款面向 PHP 的确定性格式化器。对一个文件运行它,无论该文件当前的风格如何,你都会得到相同的输出。停止争论空白,开始阅读代码。
Mago 借鉴了 Prettier、rustfmt 和 Black 所使用的“解析后再打印”的思路:
对于给定的 CST,无论输入风格如何,输出都完全一致。代码的运行时行为被精确保留:AST 是可往返的,只有表层表示发生变化。
How can I help you explore Laravel packages today?