numtide / treefmt-nix

treefmt nix configuration
https://numtide.github.io/treefmt/
MIT License
228 stars 68 forks source link

programs: add php-cs-fixer #117

Closed gaelreyrol closed 1 year ago

gaelreyrol commented 1 year ago

Hi,

This request adds PHP-CS-Fixer as a program.

I've tested it with the following options:

{
  projectRootFile = "treefmt.nix";
  programs.php-cs-fixer.enable = true;
  settings.formatter.php-cs-fixer.options = [ "--dry-run" "--diff" ];
}

And a dummy PHP file:

<?php

use \Exception;

echo "success";