Function type hints for LinkHolderArray.php
authorReedy <reedy@wikimedia.org>
Tue, 1 Jul 2014 00:40:19 +0000 (01:40 +0100)
committerReedy <reedy@wikimedia.org>
Tue, 1 Jul 2014 00:40:19 +0000 (01:40 +0100)
Change-Id: I5e429baab774a790b3558732f9c87637adfbe4ce

includes/parser/LinkHolderArray.php

index 8546348..0cbf5e8 100644 (file)
 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();