aboutsummaryrefslogtreecommitdiff
path: root/bin/phpcsff.mi5
blob: ea05eaaaac3d759003f7cff8ce797673ea813608 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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