Skip to content

Commit 7d92d42

Browse files
authored
PHPCBF command (#11)
1 parent 9a9d398 commit 7d92d42

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

commands/web/phpcbf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
#ddev-generated
4+
## Command provided by https://github.com/ddev/ddev-drupal-contrib
5+
## Description: Run phpcbf inside the web container
6+
## Usage: phpcbf [flags] [args]
7+
## Example: "ddev phpcbf" or "ddev phpcbf -n"
8+
## ProjectTypes: drupal8,drupal9,drupal10
9+
## ExecRaw: true
10+
11+
if ! command -v phpcbf >/dev/null; then
12+
echo "phpcbf is not available. You may need to 'ddev composer install'"
13+
exit 1
14+
fi
15+
test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/1.0.x/scripts/phpcs.xml.dist
16+
phpcbf -s --report-full --report-summary --report-source web/modules/custom "$@"

0 commit comments

Comments
 (0)