squizlabs/PHP_CodeSniffer — pull request #231 by MarkMaldaba (2014-08-24 07:12:31+00:00)
Title: Fix to under-reporting of white-space after closing PHP tag

Proposed fix to bug 20375 (https://pear.php.net/bugs/bug.php?id=20375).

The Sniff does not currently report additional white-space at end of file when closing PHP tag is followed by a single newline. This is because the newline character is part of the T_CLOSE_TAG token, rather than being part of the T_INLINE_HTML token that follows it.

This update now checks the contents of the T_CLOSE_TAG to check for this situation.

I have not applied a similar fix for T_OPEN_TAG, as I don't think this issue can apply there.