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

Commit 18737e8

Browse files
rossjrwAmmon Smith
andcommitted
Add format script using PHP_CodeSniffer
Co-authored-by: Ammon Smith <[email protected]>
1 parent 995a6a0 commit 18737e8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

bin/format.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
# Run separately to avoid OOM
5+
readonly directories=(
6+
'./Text'
7+
'./Tests'
8+
)
9+
10+
function run() {
11+
# Output command
12+
echo "$@"
13+
14+
# Then run
15+
"$@"
16+
}
17+
18+
# Format all the directories
19+
for dir in "${directories[@]}"; do
20+
run php bin/phpcbf.phar --standard=PSR2 "$dir"
21+
done

0 commit comments

Comments
 (0)