Add missing documentation to ProtectedTitlesPager
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Tue, 12 Feb 2019 11:57:05 +0000 (12:57 +0100)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Tue, 12 Feb 2019 11:58:43 +0000 (12:58 +0100)
This was discussed in I2b5c95d. The reason no IDE was able to find this
usage of the deprecated SpecialPage::getTitle method was the missing
type hinting.

TODO:
* A lot of properties this class uses are not declared.
* A lot of stuff in here must be private, but is public at the moment.
But this is for later patches.

Change-Id: I12fd6e517e5bd3507032ee3aafcb1de96733985b

includes/specials/pagers/ProtectedTitlesPager.php

index 49055af..296fe11 100644 (file)
  */
 class ProtectedTitlesPager extends AlphabeticPager {
 
-       public $mForm, $mConds;
+       /**
+        * @var SpecialProtectedtitles
+        */
+       public $mForm;
 
+       /**
+        * @var array
+        */
+       public $mConds;
+
+       /**
+        * @param SpecialProtectedtitles $form
+        * @param array $conds
+        * @param string|null $type
+        * @param string|null $level
+        * @param int|null $namespace
+        * @param string|null $sizetype
+        * @param int|null $size
+        */
        public function __construct( $form, $conds, $type, $level, $namespace,
                $sizetype = '', $size = 0
        ) {
@@ -55,7 +72,7 @@ class ProtectedTitlesPager extends AlphabeticPager {
         * @return Title
         */
        function getTitle() {
-               return $this->mForm->getTitle();
+               return $this->mForm->getPageTitle();
        }
 
        function formatRow( $row ) {