how to start with php code sniffer

Posted by Rahul Mehta on Stack Overflow See other posts from Stack Overflow or by Rahul Mehta
Published on 2011-01-12T05:30:53Z Indexed on 2011/01/12 5:53 UTC
Read the original article Hit count: 266

Filed under:
|
|

Hi,

I have all written code and i want to this code standarise by php code sniffer. I would like to know what is the best way to start with it . I had installed it but when i run the command

 phpcs /path/to/code/myfile.php 

in the command line i got the last one hundered line error from 310 to 410 . but if i want to see the starting errors of any line error how can i see that . Mostly errors are

 322 | ERROR   | Spaces must be used to indent lines; tabs are not allowed
 322 | ERROR   | Line indented incorrectly; expected at least 8 spaces, found 2

How can i solve these things easily and in future it don't repeat , what it saying that i should not use tab , and use space , by using space it will take time .

and how can i start with basic standard ,because don't want to utilise more time in this right now.

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about ubuntu