Commit 38ac1327 authored by catch's avatar catch

Issue #2901791 by mfernea: Fix 'Squiz.ControlStructures.ForLoopDeclaration' coding standard

parent 32879bbb
...@@ -195,7 +195,7 @@ protected function _diag($xoff, $xlim, $yoff, $ylim, $nchunks) { ...@@ -195,7 +195,7 @@ protected function _diag($xoff, $xlim, $yoff, $ylim, $nchunks) {
} }
$x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $chunk) / $nchunks); $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $chunk) / $nchunks);
for ( ; $x < $x1; $x++) { for (; $x < $x1; $x++) {
$line = $flip ? $this->yv[$x] : $this->xv[$x]; $line = $flip ? $this->yv[$x] : $this->xv[$x];
if (empty($ymatches[$line])) { if (empty($ymatches[$line])) {
continue; continue;
......
...@@ -143,6 +143,14 @@ ...@@ -143,6 +143,14 @@
</rule> </rule>
<!-- Squiz sniffs --> <!-- Squiz sniffs -->
<rule ref="Squiz.ControlStructures.ForLoopDeclaration"/>
<!-- Disable some error messages that we already cover. -->
<rule ref="Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterOpen">
<severity>0</severity>
</rule>
<rule ref="Squiz.ControlStructures.ForLoopDeclaration.SpacingBeforeClose">
<severity>0</severity>
</rule>
<rule ref="Squiz.PHP.LowercasePHPFunctions"/> <rule ref="Squiz.PHP.LowercasePHPFunctions"/>
<rule ref="Squiz.Strings.ConcatenationSpacing"> <rule ref="Squiz.Strings.ConcatenationSpacing">
<properties> <properties>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment