.../vendor/squizlabs/php_codesniffer/phpcs --standard=PSR2 myfile.php
The report is
FOUND 10 ERRORS AND 5 WARNINGS AFFECTING 15 LINES
... 236 | ERROR | [x] Line indented incorrectly; expected 4 spaces, ...
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
Then I run
.../vendor/squizlabs/php_codesniffer/phpcbf --standard=PSR2 myfile.php
Processing myfile.php [PHP => 3001 tokens in 437 lines]... DONE in 77ms (10 fixable violations)
=> Fixing file: 1/10 violations remaining [made 50 passes]... ERROR in 4.43 secs
No fixable errors were found
Time: 4.68 secs; Memory: 26.75Mb
I am running php_codesniffer locally from Laravel vendors folder.
Thanks