* @return string|bool
*/
public function fetchTemplate( $title ) {
- $rv = $this->fetchTemplateAndTitle( $title );
- return $rv[0];
+ return $this->fetchTemplateAndTitle( $title )[0];
}
/**
* @return File|bool
*/
public function fetchFile( $title, $options = [] ) {
- $res = $this->fetchFileAndTitle( $title, $options );
- return $res[0];
+ return $this->fetchFileAndTitle( $title, $options )[0];
}
/**
$anchor = $safeHeadline;
$legacyAnchor = $legacyHeadline;
if ( isset( $refers[$arrayKey] ) ) {
- // @codingStandardsIgnoreStart
+ // @codingStandardsIgnoreStart
for ( $i = 2; isset( $refers["${arrayKey}_$i"] ); ++$i );
// @codingStandardsIgnoreEnd
$anchor .= "_$i";
$refers[$arrayKey] = true;
}
if ( $legacyHeadline !== false && isset( $refers[$legacyArrayKey] ) ) {
- // @codingStandardsIgnoreStart
+ // @codingStandardsIgnoreStart
for ( $i = 2; isset( $refers["${legacyArrayKey}_$i"] ); ++$i );
// @codingStandardsIgnoreEnd
$legacyAnchor .= "_$i";
$sections[0] = $sections[0] . $toc . "\n";
}
- $full .= join( '', $sections );
+ $full .= implode( '', $sections );
if ( $this->mForceTocPosition ) {
return str_replace( '<!--MWTOC-->', $toc, $full );