aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters
diff options
context:
space:
mode:
Diffstat (limited to 'lua/conform/formatters')
-rw-r--r--lua/conform/formatters/php_cs_fixer.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/conform/formatters/php_cs_fixer.lua b/lua/conform/formatters/php_cs_fixer.lua
new file mode 100644
index 0000000..e63ec42
--- /dev/null
+++ b/lua/conform/formatters/php_cs_fixer.lua
@@ -0,0 +1,15 @@
+local util = require("conform.util")
+
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer",
+ description = "The PHP Coding Standards Fixer.",
+ },
+ command = util.find_executable({
+ "tools/php-cs-fixer/vendor/bin/php-cs-fixer",
+ "vendor/bin/php-cs-fixer",
+ }, "php-cs-fixer"),
+ args = { "fix", "$FILENAME" },
+ stdin = false,
+}