X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FParserDiffTest.php;h=93f4246e027be9e92d84f7f9f98ce7d51925b2a2;hb=eb6b48d76122e50bf6282de02f9f56c31b8248c5;hp=353825a8fbd66b84de301c115e1ba37a77fc8658;hpb=ffcb34b56efa29e32434cfe1c55ef8fc076ba9ff;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/ParserDiffTest.php b/includes/parser/ParserDiffTest.php index 353825a8fb..93f4246e02 100644 --- a/includes/parser/ParserDiffTest.php +++ b/includes/parser/ParserDiffTest.php @@ -61,12 +61,9 @@ class ParserDiffTest { $results = []; $mismatch = false; $lastResult = null; - $first = true; - foreach ( $this->parsers as $i => $parser ) { - $currentResult = call_user_func_array( [ &$this->parsers[$i], $name ], $args ); - if ( $first ) { - $first = false; - } else { + foreach ( $this->parsers as $parser ) { + $currentResult = $parser->$name( ...$args ); + if ( count( $results ) > 0 ) { if ( is_object( $lastResult ) ) { if ( $lastResult != $currentResult ) { $mismatch = true; @@ -77,7 +74,7 @@ class ParserDiffTest { } } } - $results[$i] = $currentResult; + $results[] = $currentResult; $lastResult = $currentResult; } if ( $mismatch ) {