PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
LanguageConstructSpacingSniff changes spaces to ·· (utf-8 middot)
The LanguageConstructSpacingSniff from the Squiz standard outputs the whitespace it conflicts via an extra step:
$data = [Util\Common::prepareForOutput($content)];
which adds some terminal specific ANSI escape sequences
$content = str_replace(' ', "\033[30;1m·\033[0m", $content);
This makes my subversion pre-commit hook error out with
Committing transaction...
svn: E165001: Commit failed (details follow):
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
[Error output could not be translated from the native locale to UTF-8.]
which is kinda hard to debug :(