Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Commit

Permalink
Add format script using PHP_CodeSniffer
Browse files Browse the repository at this point in the history
Co-authored-by: Ammon Smith <ammon.i.smith@gmail.com>
  • Loading branch information
rossjrw and Ammon Smith committed Jul 2, 2020
1 parent 995a6a0 commit 18737e8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bin/format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -eu

# Run separately to avoid OOM
readonly directories=(
'./Text'
'./Tests'
)

function run() {
# Output command
echo "$@"

# Then run
"$@"
}

# Format all the directories
for dir in "${directories[@]}"; do
run php bin/phpcbf.phar --standard=PSR2 "$dir"
done

0 comments on commit 18737e8

Please sign in to comment.