From c73746981c552e8bd104e9c8191e75db7967af50 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 26 May 2011 19:21:50 +0000 Subject: [PATCH] Param documentation updates/added --- includes/ImageQueryPage.php | 2 +- includes/LogPage.php | 13 ++++++++++++- includes/cache/LinkCache.php | 6 ++++++ includes/db/Database.php | 7 ++++++- includes/db/DatabaseOracle.php | 5 +++++ includes/media/GIF.php | 4 ++++ includes/specials/SpecialListredirects.php | 2 ++ includes/specials/SpecialMergeHistory.php | 4 ++++ includes/specials/SpecialMostcategories.php | 5 +++++ includes/specials/SpecialMostlinked.php | 3 +++ includes/specials/SpecialPopularpages.php | 5 +++++ includes/specials/SpecialRecentchangeslinked.php | 3 +++ includes/specials/SpecialShortpages.php | 5 +++++ includes/specials/SpecialUnusedtemplates.php | 5 +++++ includes/specials/SpecialUnwatchedpages.php | 5 +++++ includes/specials/SpecialWantedcategories.php | 5 +++++ includes/specials/SpecialWhatlinkshere.php | 13 +++++++++++-- 17 files changed, 87 insertions(+), 5 deletions(-) diff --git a/includes/ImageQueryPage.php b/includes/ImageQueryPage.php index 1edba7f87e..f46974b216 100644 --- a/includes/ImageQueryPage.php +++ b/includes/ImageQueryPage.php @@ -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 diff --git a/includes/LogPage.php b/includes/LogPage.php index 184e76830f..4afa12f44d 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -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; diff --git a/includes/cache/LinkCache.php b/includes/cache/LinkCache.php index 0e1029e554..6ffb7e0112 100644 --- a/includes/cache/LinkCache.php +++ b/includes/cache/LinkCache.php @@ -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]) ) { diff --git a/includes/db/Database.php b/includes/db/Database.php index fed315c67e..8dc2a76397 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -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; diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 1d8c58c2bf..172eaca061 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -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; diff --git a/includes/media/GIF.php b/includes/media/GIF.php index cdbde356bb..325ceb9a4f 100644 --- a/includes/media/GIF.php +++ b/includes/media/GIF.php @@ -27,6 +27,10 @@ class GIFHandler extends BitmapHandler { return serialize($parsedGIFMetadata); } + /** + * @param $image File + * @return array|bool + */ function formatMetadata( $image ) { $meta = $image->getMetadata(); diff --git a/includes/specials/SpecialListredirects.php b/includes/specials/SpecialListredirects.php index 8a2444e593..fc35b48e63 100644 --- a/includes/specials/SpecialListredirects.php +++ b/includes/specials/SpecialListredirects.php @@ -63,6 +63,8 @@ class ListredirectsPage extends QueryPage { /** * Cache page existence for performance + * + * @param $db DatabaseBase */ function preprocessResults( $db, $res ) { $batch = new LinkBatch; diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index 1f6e6286c2..99d339468f 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -35,6 +35,10 @@ class SpecialMergeHistory extends SpecialPage { parent::__construct( 'MergeHistory', 'mergehistory' ); } + /** + * @param $request WebRequest + * @return void + */ private function loadRequestParams( $request ) { global $wgUser; diff --git a/includes/specials/SpecialMostcategories.php b/includes/specials/SpecialMostcategories.php index 6f3b0a3760..2e43719673 100644 --- a/includes/specials/SpecialMostcategories.php +++ b/includes/specials/SpecialMostcategories.php @@ -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 ); diff --git a/includes/specials/SpecialMostlinked.php b/includes/specials/SpecialMostlinked.php index 73dd4f008f..58f686e8e4 100644 --- a/includes/specials/SpecialMostlinked.php +++ b/includes/specials/SpecialMostlinked.php @@ -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 ) { diff --git a/includes/specials/SpecialPopularpages.php b/includes/specials/SpecialPopularpages.php index 1ef204f702..7c7190ad42 100644 --- a/includes/specials/SpecialPopularpages.php +++ b/includes/specials/SpecialPopularpages.php @@ -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 ); diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 873055c5c9..5583c26c63 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -220,6 +220,9 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges { return $extraOpts; } + /** + * @return Title + */ function getTargetTitle() { if ( $this->rclTargetTitle === null ) { $opts = $this->getOptions(); diff --git a/includes/specials/SpecialShortpages.php b/includes/specials/SpecialShortpages.php index c53ab6a9bd..5a487fc4cc 100644 --- a/includes/specials/SpecialShortpages.php +++ b/includes/specials/SpecialShortpages.php @@ -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 diff --git a/includes/specials/SpecialUnusedtemplates.php b/includes/specials/SpecialUnusedtemplates.php index cdb4ccb836..da501605d6 100644 --- a/includes/specials/SpecialUnusedtemplates.php +++ b/includes/specials/SpecialUnusedtemplates.php @@ -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( diff --git a/includes/specials/SpecialUnwatchedpages.php b/includes/specials/SpecialUnwatchedpages.php index 92d0355008..86aa2b2d41 100644 --- a/includes/specials/SpecialUnwatchedpages.php +++ b/includes/specials/SpecialUnwatchedpages.php @@ -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; diff --git a/includes/specials/SpecialWantedcategories.php b/includes/specials/SpecialWantedcategories.php index 635b9b6347..800e940a02 100644 --- a/includes/specials/SpecialWantedcategories.php +++ b/includes/specials/SpecialWantedcategories.php @@ -48,6 +48,11 @@ class WantedCategoriesPage extends WantedQueryPage { ); } + /** + * @param $skin Skin + * @param $result + * @return string + */ function formatResult( $skin, $result ) { global $wgLang, $wgContLang; diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 44dd227381..8b4eeefb92 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -28,8 +28,17 @@ */ 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 ); -- 2.20.1