Param documentation updates/added
authorSam Reed <reedy@users.mediawiki.org>
Thu, 26 May 2011 19:21:50 +0000 (19:21 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 26 May 2011 19:21:50 +0000 (19:21 +0000)
17 files changed:
includes/ImageQueryPage.php
includes/LogPage.php
includes/cache/LinkCache.php
includes/db/Database.php
includes/db/DatabaseOracle.php
includes/media/GIF.php
includes/specials/SpecialListredirects.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialMostcategories.php
includes/specials/SpecialMostlinked.php
includes/specials/SpecialPopularpages.php
includes/specials/SpecialRecentchangeslinked.php
includes/specials/SpecialShortpages.php
includes/specials/SpecialUnusedtemplates.php
includes/specials/SpecialUnwatchedpages.php
includes/specials/SpecialWantedcategories.php
includes/specials/SpecialWhatlinkshere.php

index 1edba7f..f46974b 100644 (file)
@@ -15,7 +15,7 @@ abstract class ImageQueryPage extends QueryPage {
         *
         * @param $out OutputPage to print to
         * @param $skin Skin: user skin to use [unused]
-        * @param $dbr Database (read) connection to use
+        * @param $dbr DatabaseBase (read) connection to use
         * @param $res Integer: result pointer
         * @param $num Integer: number of available result rows
         * @param $offset Integer: paging offset
index 184e768..4afa12f 100644 (file)
@@ -38,7 +38,18 @@ class LogPage {
        const SUPPRESSED_USER = 12;
        const SUPPRESSED_ACTION = 9;
        /* @access private */
-       var $type, $action, $comment, $params, $target, $doer;
+       var $type, $action, $comment, $params;
+
+       /**
+        * @var User
+        */
+       var $doer;
+
+       /**
+        * @var Title
+        */
+       var $target;
+
        /* @acess public */
        var $updateRecentChanges, $sendToUDP;
 
index 0e1029e..6ffb7e0 100644 (file)
@@ -85,6 +85,9 @@ class LinkCache {
                        'revision' => intval( $revision ) );
        }
 
+       /**
+        * @param $title Title
+        */
        public function addBadLinkObj( $title ) {
                $dbkey = $title->getPrefixedDbKey();
                if ( !$this->isBadLink( $dbkey ) ) {
@@ -96,6 +99,9 @@ class LinkCache {
                unset( $this->mBadLinks[$title] );
        }
 
+       /**
+        * @param $title Title
+        */
        public function clearLink( $title ) {
                $dbkey = $title->getPrefixedDbKey();
                if( isset($this->mBadLinks[$dbkey]) ) {
index fed315c..8dc2a76 100644 (file)
@@ -217,7 +217,12 @@ abstract class DatabaseBase implements DatabaseType {
        protected $mDoneWrites = false;
        protected $mPHPError = false;
 
-       protected $mServer, $mUser, $mPassword, $mConn = null, $mDBname;
+       protected $mServer, $mUser, $mPassword, $mDBname;
+
+       /**
+        * @var DatabaseBase
+        */
+       protected $mConn = null;
        protected $mOpened = false;
 
        protected $mTablePrefix;
index 1d8c58c..172eaca 100644 (file)
@@ -34,6 +34,11 @@ class ORAResult {
                return $array_out;
        }
 
+       /**
+        * @param $db DatabaseBase
+        * @param $stmt
+        * @param bool $unique
+        */
        function __construct( &$db, $stmt, $unique = false ) {
                $this->db =& $db;
 
index cdbde35..325ceb9 100644 (file)
@@ -27,6 +27,10 @@ class GIFHandler extends BitmapHandler {
                return serialize($parsedGIFMetadata);
        }
 
+       /**
+        * @param $image File
+        * @return array|bool
+        */
        function formatMetadata( $image ) {
                $meta = $image->getMetadata();
 
index 8a2444e..fc35b48 100644 (file)
@@ -63,6 +63,8 @@ class ListredirectsPage extends QueryPage {
 
        /**
         * Cache page existence for performance
+        *
+        * @param $db DatabaseBase
         */
        function preprocessResults( $db, $res ) {
                $batch = new LinkBatch;
index 1f6e628..99d3394 100644 (file)
@@ -35,6 +35,10 @@ class SpecialMergeHistory extends SpecialPage {
                parent::__construct( 'MergeHistory', 'mergehistory' );
        }
 
+       /**
+        * @param $request WebRequest
+        * @return void
+        */
        private function loadRequestParams( $request ) {
                global $wgUser;
 
index 6f3b0a3..2e43719 100644 (file)
@@ -52,6 +52,11 @@ class MostcategoriesPage extends QueryPage {
                );
        }
 
+       /**
+        * @param $skin Skin
+        * @param $result
+        * @return string
+        */
        function formatResult( $skin, $result ) {
                global $wgLang;
                $title = Title::makeTitleSafe( $result->namespace, $result->title );
index 73dd4f0..58f686e 100644 (file)
@@ -57,6 +57,9 @@ class MostlinkedPage extends QueryPage {
 
        /**
         * Pre-fill the link cache
+        *
+        * @param $db DatabaseBase
+        * @param $res
         */
        function preprocessResults( $db, $res ) {
                if( $db->numRows( $res ) > 0 ) {
index 1ef204f..7c7190a 100644 (file)
@@ -48,6 +48,11 @@ class PopularPagesPage extends QueryPage {
                                        'page_namespace' => MWNamespace::getContentNamespaces() ) );
        }
 
+       /**
+        * @param $skin Skin
+        * @param $result
+        * @return string
+        */
        function formatResult( $skin, $result ) {
                global $wgLang, $wgContLang;
                $title = Title::makeTitle( $result->namespace, $result->title );
index 873055c..5583c26 100644 (file)
@@ -220,6 +220,9 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
                return $extraOpts;
        }
 
+       /**
+        * @return Title
+        */
        function getTargetTitle() {
                if ( $this->rclTargetTitle === null ) {
                        $opts = $this->getOptions();
index c53ab6a..5a487fc 100644 (file)
@@ -61,6 +61,11 @@ class ShortPagesPage extends QueryPage {
                return array( 'page_len' );
        }
 
+       /**
+        * @param $db DatabaseBase
+        * @param $res
+        * @return void
+        */
        function preprocessResults( $db, $res ) {
                # There's no point doing a batch check if we aren't caching results;
                # the page must exist for it to have been pulled out of the table
index cdb4ccb..da50160 100644 (file)
@@ -54,6 +54,11 @@ class UnusedtemplatesPage extends QueryPage {
                );
        }
 
+       /**
+        * @param $skin Skin
+        * @param $result
+        * @return string
+        */
        function formatResult( $skin, $result ) {
                $title = Title::makeTitle( NS_TEMPLATE, $result->title );
                $pageLink = $skin->linkKnown(
index 92d0355..86aa2b2 100644 (file)
@@ -60,6 +60,11 @@ class UnwatchedpagesPage extends QueryPage {
                return array( 'page_namespace', 'page_title' );
        }
 
+       /**
+        * @param $skin Skin
+        * @param $result
+        * @return string
+        */
        function formatResult( $skin, $result ) {
                global $wgContLang;
 
index 635b9b6..800e940 100644 (file)
@@ -48,6 +48,11 @@ class WantedCategoriesPage extends WantedQueryPage {
                );
        }
 
+       /**
+        * @param $skin Skin
+        * @param $result
+        * @return string
+        */
        function formatResult( $skin, $result ) {
                global $wgLang, $wgContLang;
 
index 44dd227..8b4eeef 100644 (file)
  */
 class SpecialWhatLinksHere extends SpecialPage {
 
-       // Stored objects
-       protected $opts, $target, $selfTitle;
+       /**
+        * @var FormOptions
+        */
+       protected $opts;
+
+       protected $selfTitle;
+
+       /**
+        * @var Title
+        */
+       protected $target;
 
        protected $limits = array( 20, 50, 100, 250, 500 );