From 2706fafc7f151b78bb55ef4e6f812902612a8267 Mon Sep 17 00:00:00 2001 From: "Leandro F. L" Date: Tue, 15 Oct 2019 13:08:26 -0300 Subject: [PATCH] How to use phpcbf How to use phpcbf Co-Authored-By: Lena Orobei --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index f31135c2..dfc6e391 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,14 @@ Once installed, you can run `phpcs` from the command-line to analyse your code ` ``` $ vendor/bin/phpcs --standard=Magento2 app/code/MyAwesomeExtension ``` + +### Fixing issues automatically +Also you can run `phpcbf` from the command-line to fix your code `MyAwesomeExtension` for warnings like + "PHPCBF CAN FIX THE [0-9]+ MARKED SNIFF VIOLATIONS AUTOMATICALLY" +``` +$ vendor/bin/phpcbf --standard=Magento2 app/code/MyAwesomeExtension +``` + ## Where to contribute - Documentation of existing rules. See [ExtDN PHP CodeSniffer rules for Magento 2](https://github.com/extdn/extdn-phpcs) as a good example. - Bug fixes and improvements of existing rules.