From 27291cf9ecd0260156e3635264172c90647071be Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 24 Nov 2023 10:32:34 -0500 Subject: [PATCH] Add command for running PHP Code Beautifier and Fixer (phpcbf) (#16199) --- composer.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/composer.json b/composer.json index 5f51f78607..c76bf6ab4d 100644 --- a/composer.json +++ b/composer.json @@ -533,6 +533,7 @@ "va:drush": "Run Drush transparently (all arguments will be passed).", "va:npm": "Run NPM transparently (all arguments will be passed).", "va:nuke": "Remove all Composer package and cache directories.", + "va:phpcbf": "Run PHP Code Beautifier and Fixer transparently (all arguments will be passed).", "va:remove-git-dirs": "Remove .git directories within this directory, e.g. those created by Composer.", "va:set-path": "Display a command for updating the path to include `./bin`.", "va:ds:drupal": "Build the Drupal theme.", @@ -622,6 +623,11 @@ "! ./scripts/should-run-directly.sh || ./scripts/nuke-composer-directories.sh", "./scripts/should-run-directly.sh || ddev composer va:nuke --" ], + "va:phpcbf": [ + "# Run PHP Code Beautifier and Fixer transparently (all arguments will be passed).", + "! ./scripts/should-run-directly.sh || bin/phpcbf -p --", + "./scripts/should-run-directly.sh || ddev composer va:phpcbf --" + ], "va:proxy:socks": [ "# Set up a SOCKS proxy.", "./scripts/connect-socks.sh"