-
-
Notifications
You must be signed in to change notification settings - Fork 25
Fixing coding styles automatically
Thomas Steur edited this page Jun 23, 2021
·
1 revision
Below documentation requires that you have executed composer install
in the root directory of this repository. See composer installation instructions.
Note: I recommend you run this command only when you don't have any other changes in your current branch as running this command may change a lot of files (unless you run it only for a specific file).
On every commit Travis checks for coding styles. Many of these coding styles can be fixed by running below command:
vendor/bin/phpcbf
You can also fix the coding styles for a specific file or directory only:
vendor/bin/phpcbf classes/ # for a directory
vendor/bin/phpcbf classes/WpMatomo.php # for a file
Here is an example output:
And using a diff you can inspect the made changes