【发布时间】:2016-07-22 12:22:38
【问题描述】:
我正在寻找 PHPCodeSniffer 规则来限制每个函数/方法的最大代码行数。
function something($b) {
// some comment that should be ignored in the count
$a = 12;
$value = sqrt(
$a * $b
);
return $value;
}
我希望将上述函数视为有 5 行编码(不计算 cmets 和空白行)。
【问题讨论】:
标签: php codesniffer phpcodesniffer