views:

224

answers:

2

I am using PHP CodeSniffer to check if my code complies to Zend standards. 80 chars per line is one of them. But I prefer to indent line with white spaces and sniffer treat short lines with line indentations as long lines.

Is there a way to teach it to ignore whitespace identations? Or it makes sense and the farther my line is indented, the shorter it should be?

+1  A: 

Actually this makes perfect sense to keep a line to 80 characters, no matter how many indentations you have.

Best wishes,
Fabian

halfdan
A: 

per codesniffer:docs

When the tab width is set by default, the replacement of tabs with spaces 
can be disabled for a single script run by setting the tab width to zero.

Disabling the replacement of tabs with spaces

$ phpcs --tab-width=0 /path/to/code

This of course won't help you condensing down to 80 col if your tabs/spacing is causing this to happen.

Talvi Watia
so the answer is yes, the more indented the line is, the shorter it must be.
Talvi Watia