From aa63fb9810d2e7bed14492b0a730d9c4d49028c7 Mon Sep 17 00:00:00 2001 From: Reedy Date: Tue, 1 Jul 2014 01:40:19 +0100 Subject: [PATCH] Function type hints for LinkHolderArray.php Change-Id: I5e429baab774a790b3558732f9c87637adfbe4ce --- includes/parser/LinkHolderArray.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index 854634896a..0cbf5e8145 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -27,9 +27,16 @@ class LinkHolderArray { var $internals = array(), $interwikis = array(); var $size = 0; + + /** + * @var Parser + */ var $parent; protected $tempIdOffset; + /** + * @param Parser $parent + */ function __construct( $parent ) { $this->parent = $parent; } @@ -144,6 +151,10 @@ class LinkHolderArray { return $texts; } + /** + * @param array $m + * @return string + */ protected function mergeForeignCallback( $m ) { return $m[1] . ( $m[2] + $this->tempIdOffset ) . $m[3]; } @@ -297,6 +308,7 @@ class LinkHolderArray { $queries = array(); foreach ( $this->internals as $ns => $entries ) { foreach ( $entries as $entry ) { + /** @var Title $title */ $title = $entry['title']; $pdbk = $entry['pdbk']; @@ -490,6 +502,7 @@ class LinkHolderArray { // Then add variants of links to link batch $parentTitle = $this->parent->getTitle(); foreach ( $titlesAttrs as $i => $attrs ) { + /** @var Title $title */ list( $index, $title ) = $attrs; $ns = $title->getNamespace(); $text = $title->getText(); -- 2.20.1