aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/php_cs_fixer.lua
blob: bff5a6215843d8c627a573ffdb1b158f249eda7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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,
  cwd = util.root_file({ "composer.json" }),
}