/**
* Replace <!--LINK--> link placeholders with actual links, in the buffer
*
- * @param string $text
+ * @param string &$text
*/
public function replace( &$text ) {
$this->replaceInternal( $text );
/**
* Replace internal links
- * @param string $text
+ * @param string &$text
*/
protected function replaceInternal( &$text ) {
if ( !$this->internals ) {
/**
* Replace interwiki links
- * @param string $text
+ * @param string &$text
*/
protected function replaceInterwiki( &$text ) {
if ( empty( $this->interwikis ) ) {
/**
* Modify $this->internals and $colours according to language variant linking rules
- * @param array $colours
+ * @param array &$colours
*/
protected function doVariants( &$colours ) {
global $wgContLang;
public function replaceText( $text ) {
$text = preg_replace_callback(
'/<!--(LINK|IWLINK) (.*?)-->/',
- [ &$this, 'replaceTextCallback' ],
+ [ $this, 'replaceTextCallback' ],
$text );
return $text;