Merge "Introduce ApiMaxLagInfo hook"
[lhc/web/wiklou.git] / includes / parser / CoreParserFunctions.php
index ad56afc..7f6dbe5 100644 (file)
@@ -830,7 +830,7 @@ class CoreParserFunctions {
                        $restrictions = $titleObject->getRestrictions( strtolower( $type ) );
                        # Title::getRestrictions returns an array, its possible it may have
                        # multiple values in the future
-                       return implode( $restrictions, ',' );
+                       return implode( ',', $restrictions );
                }
                return '';
        }
@@ -1005,10 +1005,10 @@ class CoreParserFunctions {
                if ( $argA == 'nowiki' ) {
                        // {{filepath: | option [| size] }}
                        $isNowiki = true;
-                       $parsedWidthParam = $parser->parseWidthParam( $argB );
+                       $parsedWidthParam = Parser::parseWidthParam( $argB );
                } else {
                        // {{filepath: [| size [|option]] }}
-                       $parsedWidthParam = $parser->parseWidthParam( $argA );
+                       $parsedWidthParam = Parser::parseWidthParam( $argA );
                        $isNowiki = ( $argB == 'nowiki' );
                }
 
@@ -1059,7 +1059,7 @@ class CoreParserFunctions {
                                $name = trim( $frame->expand( $bits['name'], PPFrame::STRIP_COMMENTS ) );
                                $value = trim( $frame->expand( $bits['value'] ) );
                                if ( preg_match( '/^(?:["\'](.+)["\']|""|\'\')$/s', $value, $m ) ) {
-                                       $value = isset( $m[1] ) ? $m[1] : '';
+                                       $value = $m[1] ?? '';
                                }
                                $attributes[$name] = $value;
                        }
@@ -1339,7 +1339,7 @@ class CoreParserFunctions {
                        foreach ( $sources[0] as $sourceTitle ) {
                                $names[] = $sourceTitle->getPrefixedText();
                        }
-                       return implode( $names, '|' );
+                       return implode( '|', $names );
                }
                return '';
        }