diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/phpcsff.mi5 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/phpcsff.mi5 b/bin/phpcsff.mi5 new file mode 100755 index 00000000..ea05eaaa --- /dev/null +++ b/bin/phpcsff.mi5 @@ -0,0 +1,15 @@ +# Use php-cs-fixer as a source filter. +self=phpcsff + +<% +include(`include/mktd.m4') +%> + +# Duplicate stdin into a file +if ! command -v php-cs-fixer >/dev/null 2>&1 ; then + printf >&2 'php-cs-fixer: command not found\n' + exit 1 +fi +cat -- "${@:--}" > "$td"/src.php +php-cs-fixer fix -- "$td"/src.php +cat -- "$td"/src.php |