Add/update a lot of documentation
This commit is contained in:
36
examples/php
Normal file
36
examples/php
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
## This usually isn't necessary, but if you need to use wrflog this
|
||||
## is how you get it:
|
||||
# source "$WF_ROOT/_reformat-common.bash"
|
||||
|
||||
|
||||
if [[ "$WOULD_REFORMAT" = "would_reformat" ]] ; then
|
||||
set +e
|
||||
out=$(php $DIR/.././vendor/bin/pint --test "$1")
|
||||
retval="$?"
|
||||
set -e
|
||||
|
||||
# unfortunately, pint doesn't distinguish between files with
|
||||
# syntax errors and files that are merely misformatted
|
||||
|
||||
echo "$out"
|
||||
exit "$retval"
|
||||
fi
|
||||
|
||||
if [[ "$WOULD_REFORMAT" = "do_reformat" ]] ; then
|
||||
set +e
|
||||
out=$(php $DIR/.././vendor/bin/pint "$1")
|
||||
retval="$?"
|
||||
set -e
|
||||
|
||||
echo "$out"
|
||||
exit "$retval"
|
||||
fi
|
||||
|
||||
exit 255
|
||||
Reference in New Issue
Block a user