PHP代码嗅探器开始缩进

PHP代码嗅探器开始缩进,php,phpcs,Php,Phpcs,我正在考虑将PHPC设置为在构建时运行,并报告任何问题 我发现更具可读性的是基于开放式PHP标记的开始缩进: 但PHPCS似乎决定我需要这样的东西: 我知道这可能是一个滑坡和高度偏见,但我非常希望有这个特定的规则配置 因此,我得到: 2 | ERROR | [ ] Missing file doc comment 3 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4 3 | ERROR |

我正在考虑将PHPC设置为在构建时运行,并报告任何问题

我发现更具可读性的是基于开放式PHP标记的开始缩进:

但PHPCS似乎决定我需要这样的东西:

我知道这可能是一个滑坡和高度偏见,但我非常希望有这个特定的规则配置

因此,我得到:

 2 | ERROR   | [ ] Missing file doc comment
 3 | ERROR   | [x] Line indented incorrectly; expected 0 spaces, found 4
 3 | ERROR   | [ ] Expected "if (...) {\n"; found "if (...)\n    {\n"
 3 | WARNING | [ ] Line exceeds 85 characters; contains 94 characters
 3 | ERROR   | [x] There must be a single space between the closing parenthesis and the opening brace of a multi-line IF statement; found newline
 5 | ERROR   | [x] File is being conditionally included; use "include" instead
 5 | WARNING | [ ] Line exceeds 85 characters; contains 89 characters
 6 | ERROR   | [x] Line indented incorrectly; expected 0 spaces, found 4
我对这个错误特别感兴趣:

 3 | ERROR   | [x] Line indented incorrectly; expected 0 spaces, found 4
到目前为止,我已确定此错误来自:

/usr/share/php/PHP/CodeSniffer/src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php#955

有没有办法做到这一点?

我想应该是设置/editor/codestyle/php,然后第一个选项卡缩进和制表符。不,我已经微调了IDE的代码样式,我需要PHPCS的嗅探配置