antonioribeiro / laravelcs

Laravel PHP_CodeSniffer
BSD 3-Clause "New" or "Revised" License
234 stars 32 forks source link

Tabs incorrectly expected when using Standard #15

Open sirviejo opened 5 years ago

sirviejo commented 5 years ago

I am using the standard installed globally, but for some reason, it is expecting tabs to indent code instead of the 4 spaces defined in the https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md that is followed by Laravel.

This is the command I am using phpcs --standard=$HOME/.composer/vendor/pragmarx/laravelcs/Standards/Laravel/ app/Http/Controllers/ParentController.php

See output

FILE: ...grant/code/mykidsmoola/app/Http/Controllers/ParentController.php

FOUND 10 ERRORS AFFECTING 9 LINES

23 | ERROR | [x] Tabs must be used to indent lines; spaces are not | | allowed 23 | ERROR | [x] Multi-line function call not indented correctly; | | expected 6 spaces but found 8 24 | ERROR | [x] Tabs must be used to indent lines; spaces are not | | allowed 25 | ERROR | [x] Tabs must be used to indent lines; spaces are not | | allowed 26 | ERROR | [x] Tabs must be used to indent lines; spaces are not | | allowed 27 | ERROR | [x] Tabs must be used to indent lines; spaces are not | | allowed 39 | ERROR | [x] Tabs must be used to indent lines; spaces are not | | allowed 40 | ERROR | [x] Multi-line function call not indented correctly; | | expected 6 spaces but found 3 41 | ERROR | [x] Multi-line function call not indented correctly; | | expected 6 spaces but found 3 42 | ERROR | [x] Multi-line function call not indented correctly; | | expected 6 spaces but found 3

PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY

Time: 39ms; Memory: 4Mb`