squizlabs/PHP_CodeSniffer — pull request #144 by dereuromark (2013-08-16 22:23:21+00:00)
Title: make sniff work with different OS and different newlines

Fix false reports on windows with \r\n counting as two spaces:

On windows this fixes the false reports like:

2977 | ERROR | Expected 1 space after logical operator; 2 found
| | (Sqiz.WhiteSpace.LogicalOperatorSpacing.TooMuchSpaceAfter)

The problem is that the error message is not clear - and cloaks the fact that this file would otherwise be fine.

Each sniff should only trigger what it is meant to look for. This sniff is merely there to check on the amount of spaces. If the newlines have to be in the correct (e.g. only unix style) format a different sniff should check on.