diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php b/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
index 7885c6f00e..5a58704ee2 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffEngine.php
@@ -195,7 +195,7 @@ protected function _diag($xoff, $xlim, $yoff, $ylim, $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];
         if (empty($ymatches[$line])) {
           continue;
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index a593e62c7d..86c1eaa286 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -116,11 +116,19 @@
   </rule>
 
   <!-- 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.Strings.ConcatenationSpacing">
     <properties>
       <property name="spacing" value="1"/>
       <property name="ignoreNewlines" value="true"/>
     </properties>
- </rule>
+  </rule>
 
 </ruleset>
