Use "break" instead of "continue"
authorRazeSoldier <razesoldier@outlook.com>
Thu, 23 Aug 2018 16:18:07 +0000 (00:18 +0800)
committerRazeSoldier <razesoldier@outlook.com>
Thu, 23 Aug 2018 16:18:07 +0000 (00:18 +0800)
"continue" statements are equivalent to "break". In PHP 7.3, will generate a warning.

Bug: T200595
Change-Id: I244ecb2e1ce5a76295f014fb1becd8d263196846

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 );