build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
[lhc/web/wiklou.git] / includes / parser / Parser.php
index e7e7aa0..b871735 100644 (file)
@@ -96,10 +96,9 @@ class Parser {
        # at least one character of a host name (embeds EXT_LINK_URL_CLASS)
        const EXT_LINK_ADDR = '(?:[0-9.]+|\\[(?i:[0-9a-f:.]+)\\]|[^][<>"\\x00-\\x20\\x7F\p{Zs}\x{FFFD}])';
        # RegExp to make image URLs (embeds IPv6 part of EXT_LINK_ADDR)
-       // @codingStandardsIgnoreStart Generic.Files.LineLength
+       // phpcs:ignore Generic.Files.LineLength
        const EXT_IMAGE_REGEX = '/^(http:\/\/|https:\/\/)((?:\\[(?i:[0-9a-f:.]+)\\])?[^][<>"\\x00-\\x20\\x7F\p{Zs}\x{FFFD}]+)
                \\/([A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]+)\\.((?i)gif|png|jpg|jpeg)$/Sxu';
-       // @codingStandardsIgnoreEnd
 
        # Regular expression for a non-newline space
        const SPACE_NOT_NL = '(?:\t|&nbsp;|&\#0*160;|&\#[Xx]0*[Aa]0;|\p{Zs})';
@@ -2139,11 +2138,8 @@ class Parser {
 
                $useSubpages = $this->areSubpagesAllowed();
 
-               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                # Loop for each link
                for ( ; $line !== false && $line !== null; $a->next(), $line = $a->current() ) {
-                       // @codingStandardsIgnoreEnd
-
                        # Check for excessive memory usage
                        if ( $holders->isBig() ) {
                                # Too big
@@ -3577,9 +3573,8 @@ class Parser {
                $deps = [];
 
                # Loop to fetch the article, with up to 1 redirect
-               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $i = 0; $i < 2 && is_object( $title ); $i++ ) {
-                       // @codingStandardsIgnoreEnd
                        # Give extensions a chance to select the revision instead
                        $id = false; # Assume current
                        Hooks::run( 'BeforeParserFetchTemplateAndtitle',
@@ -4253,9 +4248,8 @@ class Parser {
                        $anchor = $safeHeadline;
                        $fallbackAnchor = $fallbackHeadline;
                        if ( isset( $refers[$arrayKey] ) ) {
-                               // @codingStandardsIgnoreStart
+                               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall,Generic.Formatting.DisallowMultipleStatements
                                for ( $i = 2; isset( $refers["${arrayKey}_$i"] ); ++$i );
-                               // @codingStandardsIgnoreEnd
                                $anchor .= "_$i";
                                $linkAnchor .= "_$i";
                                $refers["${arrayKey}_$i"] = true;
@@ -4263,9 +4257,8 @@ class Parser {
                                $refers[$arrayKey] = true;
                        }
                        if ( $fallbackHeadline !== false && isset( $refers[$fallbackArrayKey] ) ) {
-                               // @codingStandardsIgnoreStart
+                               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall,Generic.Formatting.DisallowMultipleStatements
                                for ( $i = 2; isset( $refers["${fallbackArrayKey}_$i"] ); ++$i );
-                               // @codingStandardsIgnoreEnd
                                $fallbackAnchor .= "_$i";
                                $refers["${fallbackArrayKey}_$i"] = true;
                        } else {