Fix phpcs issues from LanguageConverter patches
[lhc/web/wiklou.git] / languages / LanguageConverter.php
index f9610fa..8e98abd 100644 (file)
@@ -412,11 +412,11 @@ class LanguageConverter {
                                $log = LoggerFactory::getInstance( 'languageconverter' );
                                $log->error( "Hit pcre.backtrack_limit in " . __METHOD__
                                        . ". Disabling language conversion for this page.",
                                $log = LoggerFactory::getInstance( 'languageconverter' );
                                $log->error( "Hit pcre.backtrack_limit in " . __METHOD__
                                        . ". Disabling language conversion for this page.",
-                                       array(
+                                       [
                                                "method" => __METHOD__,
                                                "variant" => $toVariant,
                                                "startOfText" => substr( $text, 0, 500 )
                                                "method" => __METHOD__,
                                                "variant" => $toVariant,
                                                "startOfText" => substr( $text, 0, 500 )
-                                       )
+                                       ]
                                );
                                return $text;
                        }
                                );
                                return $text;
                        }
@@ -665,7 +665,9 @@ class LanguageConverter {
 
                $noScript = '<script.*?>.*?<\/script>(*SKIP)(*FAIL)';
                $noStyle = '<style.*?>.*?<\/style>(*SKIP)(*FAIL)';
 
                $noScript = '<script.*?>.*?<\/script>(*SKIP)(*FAIL)';
                $noStyle = '<style.*?>.*?<\/style>(*SKIP)(*FAIL)';
+               // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
                $noHtml = '<(?:[^>=]*+(?>[^>=]*+=\s*+(?:"[^"]*"|\'[^\']*\'|[^\'">\s]*+))*+[^>=]*+>|.*+)(*SKIP)(*FAIL)';
                $noHtml = '<(?:[^>=]*+(?>[^>=]*+=\s*+(?:"[^"]*"|\'[^\']*\'|[^\'">\s]*+))*+[^>=]*+>|.*+)(*SKIP)(*FAIL)';
+               // @codingStandardsIgnoreEnd
                while ( $startPos < $length && $continue ) {
                        $continue = preg_match(
                                // Only match -{ outside of html.
                while ( $startPos < $length && $continue ) {
                        $continue = preg_match(
                                // Only match -{ outside of html.