Merge "Use "break" instead of "continue""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 29 Aug 2018 13:07:00 +0000 (13:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 29 Aug 2018 13:07:00 +0000 (13:07 +0000)
includes/json/FormatJson.php
languages/LanguageConverter.php

index 1ab17a0..fbcb3bd 100644 (file)
@@ -271,7 +271,7 @@ class FormatJson {
                                        $lookAhead = ( $idx + 1 < $maxLen ) ? $str[$idx + 1] : '';
                                        $lookBehind = ( $idx - 1 >= 0 ) ? $str[$idx - 1] : '';
                                        if ( $inString ) {
-                                               continue;
+                                               break;
 
                                        } elseif ( !$inComment &&
                                                ( $lookAhead === '/' || $lookAhead === '*' )
index c098518..cb0f66f 100644 (file)
@@ -773,7 +773,7 @@ class LanguageConverter {
                                                        $warningDone = true;
                                                }
                                                $startPos += 2;
-                                               continue;
+                                               break;
                                        }
                                        // Recursively parse another rule
                                        $inner .= $this->recursiveConvertRule( $text, $variant, $startPos, $depth + 1 );