【发布时间】:2019-11-20 10:11:40
【问题描述】:
我已在phpcs.xml 中更新了我的 phpcs 规则以包括:
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
效果很好,但是如果我有:
function test($x) {
$string = 'Hello';
return $string . $x;
}
没有错误出现,但如果没有缩进,它确实会出现。我无法弄清楚似乎是什么问题。
【问题讨论】: