From: Siebrand Mazeland Date: Sun, 14 Apr 2013 19:18:38 +0000 (+0200) Subject: Update/add documentation X-Git-Tag: 1.31.0-rc.0~20008 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=b84a680a32ba03625d24ae3912c862d78ce73c16;p=lhc%2Fweb%2Fwiklou.git Update/add documentation Change-Id: I897d5833cdaf7dc2d3bca5bb5551958611f22bd9 --- diff --git a/includes/ImageQueryPage.php b/includes/ImageQueryPage.php index f9f6ceed4b..b9ec6e027a 100644 --- a/includes/ImageQueryPage.php +++ b/includes/ImageQueryPage.php @@ -29,17 +29,16 @@ * @author Rob Church */ abstract class ImageQueryPage extends QueryPage { - /** * Format and output report results using the given information plus * OutputPage * - * @param $out OutputPage to print to - * @param $skin Skin: user skin to use [unused] - * @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 + * @param OutputPage $out OutputPage to print to + * @param Skin $skin User skin to use [unused] + * @param DatabaseBase $dbr (read) connection to use + * @param int $res Result pointer + * @param int $num Number of available result rows + * @param int $offset Paging offset */ protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) { if( $num > 0 ) { @@ -65,11 +64,10 @@ abstract class ImageQueryPage extends QueryPage { /** * Get additional HTML to be shown in a results' cell * - * @param $row Object: result row - * @return String + * @param object $row Result row + * @return string */ protected function getCellHtml( $row ) { return ''; } - } diff --git a/includes/PageQueryPage.php b/includes/PageQueryPage.php index 01a2439f54..61a535d668 100644 --- a/includes/PageQueryPage.php +++ b/includes/PageQueryPage.php @@ -27,12 +27,11 @@ * @ingroup SpecialPage */ abstract class PageQueryPage extends QueryPage { - /** * Format the result as a simple link to the page * - * @param $skin Skin - * @param $row Object: result row + * @param Skin $skin + * @param object $row Result row * @return string */ public function formatResult( $skin, $row ) { diff --git a/includes/QueryPage.php b/includes/QueryPage.php index e1f24fa94f..5b050c4f48 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -89,7 +89,7 @@ abstract class QueryPage extends SpecialPage { /** * The offset and limit in use, as passed to the query() function * - * @var integer + * @var int */ var $offset = 0; var $limit = 0; @@ -111,7 +111,7 @@ abstract class QueryPage extends SpecialPage { /** * A mutator for $this->listoutput; * - * @param $bool Boolean + * @param bool $bool */ function setListoutput( $bool ) { $this->listoutput = $bool; @@ -186,7 +186,7 @@ abstract class QueryPage extends SpecialPage { /** * Override to sort by increasing values * - * @return Boolean + * @return bool */ function sortDescending() { return true; @@ -197,7 +197,7 @@ abstract class QueryPage extends SpecialPage { * don't let it run in miser mode. $wgDisableQueryPages causes all query * pages to be declared expensive. Some query pages are always expensive. * - * @return Boolean + * @return bool */ function isExpensive() { global $wgDisableQueryPages; @@ -208,7 +208,7 @@ abstract class QueryPage extends SpecialPage { * Is the output of this query cacheable? Non-cacheable expensive pages * will be disabled in miser mode and will not have their results written * to the querycache table. - * @return Boolean + * @return bool * @since 1.18 */ public function isCacheable() { @@ -219,7 +219,7 @@ abstract class QueryPage extends SpecialPage { * Whether or not the output of the page in question is retrieved from * the database cache. * - * @return Boolean + * @return bool */ function isCached() { global $wgMiserMode; @@ -230,7 +230,7 @@ abstract class QueryPage extends SpecialPage { /** * Sometime we don't want to build rss / atom feeds. * - * @return Boolean + * @return bool */ function isSyndicated() { return true; @@ -241,19 +241,16 @@ abstract class QueryPage extends SpecialPage { * skin; you can use it for making links. The result is a single row of * result data. You should be able to grab SQL results off of it. * If the function returns false, the line output will be skipped. - * @param $skin Skin - * @param $result object Result row - * @return mixed String or false to skip - * - * @param $skin Skin object - * @param $result Object: database row + * @param Skin $skin + * @param object $result Result row + * @return string|bool String or false to skip */ abstract function formatResult( $skin, $result ); /** * The content returned by this function will be output before any result * - * @return String + * @return string */ function getPageHeader() { return ''; @@ -264,7 +261,7 @@ abstract class QueryPage extends SpecialPage { * as an associative array. They will be encoded and added to the paging * links (prev/next/lengths). * - * @return Array + * @return array */ function linkParameters() { return array(); @@ -285,8 +282,9 @@ abstract class QueryPage extends SpecialPage { /** * Clear the cache and save new results * - * @param $limit Integer: limit for SQL statement - * @param $ignoreErrors Boolean: whether to ignore database errors + * @param int|bool $limit Limit for SQL statement + * @param bool $ignoreErrors Whether to ignore database errors + * @throws DBError|Exception * @return bool|int */ function recache( $limit, $ignoreErrors = true ) { @@ -351,8 +349,8 @@ abstract class QueryPage extends SpecialPage { /** * Run the query and return the result - * @param $limit mixed Numerical limit or false for no limit - * @param $offset mixed Numerical offset or false for no offset + * @param int|bool $limit Numerical limit or false for no limit + * @param int|bool $offset Numerical offset or false for no offset * @return ResultWrapper * @since 1.18 */ @@ -361,23 +359,28 @@ abstract class QueryPage extends SpecialPage { $dbr = wfGetDB( DB_SLAVE ); $query = $this->getQueryInfo(); $order = $this->getOrderFields(); + if ( $this->sortDescending() ) { foreach ( $order as &$field ) { $field .= ' DESC'; } } + if ( is_array( $query ) ) { $tables = isset( $query['tables'] ) ? (array)$query['tables'] : array(); $fields = isset( $query['fields'] ) ? (array)$query['fields'] : array(); $conds = isset( $query['conds'] ) ? (array)$query['conds'] : array(); $options = isset( $query['options'] ) ? (array)$query['options'] : array(); $join_conds = isset( $query['join_conds'] ) ? (array)$query['join_conds'] : array(); + if ( count( $order ) ) { $options['ORDER BY'] = $order; } + if ( $limit !== false ) { $options['LIMIT'] = intval( $limit ); } + if ( $offset !== false ) { $options['OFFSET'] = intval( $offset ); } @@ -392,11 +395,14 @@ abstract class QueryPage extends SpecialPage { $sql = $dbr->limitResult( $sql, $limit, $offset ); $res = $dbr->query( $sql, $fname ); } + return $dbr->resultObject( $res ); } /** * Somewhat deprecated, you probably want to be using execute() + * @param int|bool $offset + * @oaram int|bool $limit * @return ResultWrapper */ function doQuery( $offset = false, $limit = false ) { @@ -409,8 +415,8 @@ abstract class QueryPage extends SpecialPage { /** * Fetch the query results from the query cache - * @param $limit mixed Numerical limit or false for no limit - * @param $offset mixed Numerical offset or false for no offset + * @param int|bool $limit Numerical limit or false for no limit + * @param int|bool $offset Numerical offset or false for no offset * @return ResultWrapper * @since 1.18 */ @@ -451,6 +457,7 @@ abstract class QueryPage extends SpecialPage { /** * This is the actual workhorse. It does everything needed to make a * real, honest-to-gosh query page. + * @para $par * @return int */ function execute( $par ) { @@ -562,12 +569,12 @@ abstract class QueryPage extends SpecialPage { * Format and output report results using the given information plus * OutputPage * - * @param $out OutputPage to print to - * @param $skin Skin: user skin to use - * @param $dbr Database (read) connection to use - * @param $res Integer: result pointer - * @param $num Integer: number of available result rows - * @param $offset Integer: paging offset + * @param OutputPage $out OutputPage to print to + * @param Skin $skin User skin to use + * @param DatabaseBase $dbr Database (read) connection to use + * @param int $res Result pointer + * @param int $num Number of available result rows + * @param int $offset Paging offset */ protected function outputResults( $out, $skin, $dbr, $res, $num, $offset ) { global $wgContLang; @@ -635,11 +642,15 @@ abstract class QueryPage extends SpecialPage { /** * Do any necessary preprocessing of the result object. + * @param DatabaseBase $db + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) {} /** * Similar to above, but packaging in a syndicated feed instead of a web page + * @param string $class + * @param int $limit * @return bool */ function doFeed( $class = '', $limit = 50 ) { @@ -680,6 +691,7 @@ abstract class QueryPage extends SpecialPage { /** * Override for custom handling. If the titles/links are ok, just do * feedItemDesc() + * @param object $row * @return FeedItem|null */ function feedResult( $row ) { @@ -735,7 +747,6 @@ abstract class QueryPage extends SpecialPage { * WantedPages, WantedTemplates, etc */ abstract class WantedQueryPage extends QueryPage { - function isExpensive() { return true; } @@ -746,6 +757,8 @@ abstract class WantedQueryPage extends QueryPage { /** * Cache page existence for performance + * @param DatabaseBase $db + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { if ( !$res->numRows() ) { @@ -777,8 +790,8 @@ abstract class WantedQueryPage extends QueryPage { /** * Format an individual result * - * @param $skin Skin to use for UI elements - * @param $result Result row + * @param Skin $skin Skin to use for UI elements + * @param object $result Result row * @return string */ public function formatResult( $skin, $result ) { @@ -812,8 +825,8 @@ abstract class WantedQueryPage extends QueryPage { /** * Make a "what links here" link for a given title * - * @param $title Title to make the link for - * @param $result Object: result row + * @param Title $title Title to make the link for + * @param object $result Result row * @return string */ private function makeWlhLink( $title, $result ) { diff --git a/includes/specials/SpecialAllmessages.php b/includes/specials/SpecialAllmessages.php index 7f315ded8c..16652a9bef 100644 --- a/includes/specials/SpecialAllmessages.php +++ b/includes/specials/SpecialAllmessages.php @@ -28,7 +28,6 @@ * @ingroup SpecialPage */ class SpecialAllmessages extends SpecialPage { - /** * @var AllmessagesTablePager */ @@ -87,7 +86,6 @@ class SpecialAllmessages extends SpecialPage { * getting data from a table when in fact not all of it comes from the database. */ class AllmessagesTablePager extends TablePager { - protected $filter, $prefix, $langcode, $displayPrefix; public $mLimitsShown; diff --git a/includes/specials/SpecialAncientpages.php b/includes/specials/SpecialAncientpages.php index fafe75fd8c..5d0b79f390 100644 --- a/includes/specials/SpecialAncientpages.php +++ b/includes/specials/SpecialAncientpages.php @@ -64,6 +64,11 @@ class AncientPagesPage extends QueryPage { return false; } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { global $wgContLang; diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 53f7f4d616..2a5e5047a4 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -527,6 +527,7 @@ class SpecialBlock extends FormSpecialPage { public static function validateTarget( $value, User $user ) { global $wgBlockCIDRLimit; + /** @var User $target */ list( $target, $type ) = self::getTargetAndType( $value ); $status = Status::newGood( $target ); @@ -605,6 +606,7 @@ class SpecialBlock extends FormSpecialPage { # can come from it $data['Confirm'] = !in_array( $data['Confirm'], array( '', '0', null, false ), true ); + /** @var User $target */ list( $target, $type ) = self::getTargetAndType( $data['Target'] ); if ( $type == Block::TYPE_USER ) { $user = $target; diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index eb25eafb16..25f9165afb 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -420,7 +420,7 @@ class BlockListPager extends TablePager { /** * Do a LinkBatch query to minimise database load when generating all these links - * @param $result + * @param ResultWrapper $result */ function preprocessResults( $result ) { wfProfileIn( __METHOD__ ); diff --git a/includes/specials/SpecialBrokenRedirects.php b/includes/specials/SpecialBrokenRedirects.php index e6fd58d22b..dd878cf2bb 100644 --- a/includes/specials/SpecialBrokenRedirects.php +++ b/includes/specials/SpecialBrokenRedirects.php @@ -92,9 +92,9 @@ class BrokenRedirectsPage extends QueryPage { } /** - * @param $skin Skin - * @param $result - * @return String + * @param Skin $skin + * @param object $result Result row + * @return string */ function formatResult( $skin, $result ) { $fromObj = Title::makeTitle( $result->namespace, $result->title ); diff --git a/includes/specials/SpecialDisambiguations.php b/includes/specials/SpecialDisambiguations.php index 2126ca5201..effad9ecbf 100644 --- a/includes/specials/SpecialDisambiguations.php +++ b/includes/specials/SpecialDisambiguations.php @@ -27,7 +27,6 @@ * @ingroup SpecialPage */ class DisambiguationsPage extends QueryPage { - function __construct( $name = 'Disambiguations' ) { parent::__construct( $name ); } @@ -86,6 +85,7 @@ class DisambiguationsPage extends QueryPage { $set = 'FALSE'; wfDebug( "Mediawiki:disambiguationspage message does not link to any templates!\n" ); } + return $set; } @@ -125,8 +125,8 @@ class DisambiguationsPage extends QueryPage { /** * Fetch links and cache their existence * - * @param $db DatabaseBase - * @param $res + * @param DatabaseBase $db + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { if ( !$res->numRows() ) { @@ -142,6 +142,11 @@ class DisambiguationsPage extends QueryPage { $res->seek( 0 ); } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { $title = Title::newFromID( $result->value ); $dp = Title::makeTitle( $result->namespace, $result->title ); diff --git a/includes/specials/SpecialDoubleRedirects.php b/includes/specials/SpecialDoubleRedirects.php index 5a5d749c75..e2b36a5c37 100644 --- a/includes/specials/SpecialDoubleRedirects.php +++ b/includes/specials/SpecialDoubleRedirects.php @@ -28,7 +28,6 @@ * @ingroup SpecialPage */ class DoubleRedirectsPage extends QueryPage { - function __construct( $name = 'DoubleRedirects' ) { parent::__construct( $name ); } @@ -91,10 +90,12 @@ class DoubleRedirectsPage extends QueryPage { 'rb.rd_from = pb.page_id', ) ); + if ( $limitToTitle ) { $retval['conds']['pa.page_namespace'] = $namespace; $retval['conds']['pa.page_title'] = $title; } + return $retval; } @@ -106,6 +107,11 @@ class DoubleRedirectsPage extends QueryPage { return array ( 'ra.rd_namespace', 'ra.rd_title' ); } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { $titleA = Title::makeTitle( $result->namespace, $result->title ); diff --git a/includes/specials/SpecialFewestrevisions.php b/includes/specials/SpecialFewestrevisions.php index 5b7f353dbb..d04fbdde51 100644 --- a/includes/specials/SpecialFewestrevisions.php +++ b/includes/specials/SpecialFewestrevisions.php @@ -65,8 +65,8 @@ class FewestrevisionsPage extends QueryPage { } /** - * @param $skin Skin object - * @param $result Object: database row + * @param Skin $skin + * @param object $result Database row * @return String */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index cc5cd5b1a9..71f19fa475 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -59,7 +59,7 @@ class FileDuplicateSearchPage extends QueryPage { /** * Fetch dupes from all connected file repositories. * - * @return Array of File objects + * @return array of File objects */ function getDupes() { return RepoGroup::singleton()->findBySha1( $this->hash ); diff --git a/includes/specials/SpecialLinkSearch.php b/includes/specials/SpecialLinkSearch.php index af5b0a1bff..b1ffa56217 100644 --- a/includes/specials/SpecialLinkSearch.php +++ b/includes/specials/SpecialLinkSearch.php @@ -189,6 +189,11 @@ class LinkSearchPage extends QueryPage { return $retval; } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { $title = Title::makeTitle( $result->namespace, $result->title ); $url = $result->url; diff --git a/includes/specials/SpecialListredirects.php b/includes/specials/SpecialListredirects.php index 0283767a36..4e516a336d 100644 --- a/includes/specials/SpecialListredirects.php +++ b/includes/specials/SpecialListredirects.php @@ -73,8 +73,8 @@ class ListredirectsPage extends QueryPage { /** * Cache page existence for performance * - * @param $db DatabaseBase - * @param $res ResultWrapper + * @param DatabaseBase $db + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { $batch = new LinkBatch; @@ -104,6 +104,11 @@ class ListredirectsPage extends QueryPage { } } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { # Make a link to the redirect itself $rd_title = Title::makeTitle( $result->namespace, $result->title ); diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index c5a109d43b..c11016d243 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -92,6 +92,11 @@ class MIMEsearchPage extends QueryPage { parent::execute( $par ); } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { global $wgContLang; diff --git a/includes/specials/SpecialMostcategories.php b/includes/specials/SpecialMostcategories.php index 11f26bd76e..95b76de3fb 100644 --- a/includes/specials/SpecialMostcategories.php +++ b/includes/specials/SpecialMostcategories.php @@ -30,7 +30,6 @@ * @ingroup SpecialPage */ class MostcategoriesPage extends QueryPage { - function __construct( $name = 'Mostcategories' ) { parent::__construct( $name ); } @@ -58,8 +57,8 @@ class MostcategoriesPage extends QueryPage { } /** - * @param $db DatabaseBase - * @param $res + * @param DatabaseBase $db + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { # There's no point doing a batch check if we aren't caching results; @@ -78,8 +77,8 @@ class MostcategoriesPage extends QueryPage { } /** - * @param $skin Skin - * @param $result + * @param Skin $skin + * @param object $result Result row * @return string */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialMostinterwikis.php b/includes/specials/SpecialMostinterwikis.php index 574a9afb96..66bd595f39 100644 --- a/includes/specials/SpecialMostinterwikis.php +++ b/includes/specials/SpecialMostinterwikis.php @@ -72,8 +72,8 @@ class MostinterwikisPage extends QueryPage { /** * Pre-fill the link cache * - * @param $db DatabaseBase - * @param $res + * @param DatabaseBase $db + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { # There's no point doing a batch check if we aren't caching results; diff --git a/includes/specials/SpecialMostlinked.php b/includes/specials/SpecialMostlinked.php index 4b6e56705f..6633e0a3ec 100644 --- a/includes/specials/SpecialMostlinked.php +++ b/includes/specials/SpecialMostlinked.php @@ -63,8 +63,8 @@ class MostlinkedPage extends QueryPage { /** * Pre-fill the link cache * - * @param $db DatabaseBase - * @param $res + * @param DatabaseBase $db + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { if ( $res->numRows() > 0 ) { @@ -92,8 +92,8 @@ class MostlinkedPage extends QueryPage { /** * Make links to the page corresponding to the item, and the "what links here" page for it * - * @param $skin Skin to be used - * @param $result Result row + * @param Skin $skin Skin to be used + * @param object $result Result row * @return string */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialMostlinkedcategories.php b/includes/specials/SpecialMostlinkedcategories.php index a1bce45d80..162ca16889 100644 --- a/includes/specials/SpecialMostlinkedcategories.php +++ b/includes/specials/SpecialMostlinkedcategories.php @@ -55,8 +55,8 @@ class MostlinkedCategoriesPage extends QueryPage { /** * Fetch user page links and cache their existence * - * @param $db DatabaseBase - * @param $res DatabaseResult + * @param DatabaseBase $db + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { if ( !$res->numRows() ) { @@ -74,8 +74,8 @@ class MostlinkedCategoriesPage extends QueryPage { } /** - * @param $skin Skin - * @param $result + * @param Skin $skin + * @param object $result Result row * @return string */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialMostlinkedtemplates.php b/includes/specials/SpecialMostlinkedtemplates.php index 506e6b22a8..5d70df8db7 100644 --- a/includes/specials/SpecialMostlinkedtemplates.php +++ b/includes/specials/SpecialMostlinkedtemplates.php @@ -76,7 +76,7 @@ class MostlinkedTemplatesPage extends QueryPage { * Pre-cache page existence to speed up link generation * * @param $db DatabaseBase connection - * @param $res ResultWrapper + * @param ResultWrapper $res */ public function preprocessResults( $db, $res ) { if ( !$res->numRows() ) { @@ -95,9 +95,9 @@ class MostlinkedTemplatesPage extends QueryPage { /** * Format a result row * - * @param $skin Skin to use for UI elements - * @param $result Result row - * @return String + * @param Skin $skin + * @param object $result Result row + * @return string */ public function formatResult( $skin, $result ) { $title = Title::makeTitleSafe( $result->namespace, $result->title ); @@ -115,8 +115,8 @@ class MostlinkedTemplatesPage extends QueryPage { /** * Make a "what links here" link for a given title * - * @param $title Title to make the link for - * @param $result Result row + * @param Title $title Title to make the link for + * @param object $result Result row * @return String */ private function makeWlhLink( $title, $result ) { diff --git a/includes/specials/SpecialPagesWithProp.php b/includes/specials/SpecialPagesWithProp.php index 2f498032c7..51dd99ff81 100644 --- a/includes/specials/SpecialPagesWithProp.php +++ b/includes/specials/SpecialPagesWithProp.php @@ -119,6 +119,11 @@ class SpecialPagesWithProp extends QueryPage { return array( 'page_id' ); } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { $title = Title::newFromRow( $result ); $ret = Linker::link( $title, null, array(), array(), array( 'known' ) ); diff --git a/includes/specials/SpecialPopularpages.php b/includes/specials/SpecialPopularpages.php index 7ce8c13f41..7db341fd24 100644 --- a/includes/specials/SpecialPopularpages.php +++ b/includes/specials/SpecialPopularpages.php @@ -52,8 +52,8 @@ class PopularPagesPage extends QueryPage { } /** - * @param $skin Skin - * @param $result + * @param Skin $skin + * @param object $result Result row * @return string */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 4700648b6c..a61e0dddf8 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -69,7 +69,7 @@ class SpecialProtectedtitles extends SpecialPage { /** * Callback function to output a restriction * - * @param Object $row Database row + * @param object $row Database row * @return string */ function formatRow( $row ) { diff --git a/includes/specials/SpecialShortpages.php b/includes/specials/SpecialShortpages.php index 1be7fbed30..e08aa8c90b 100644 --- a/includes/specials/SpecialShortpages.php +++ b/includes/specials/SpecialShortpages.php @@ -56,8 +56,7 @@ class ShortPagesPage extends QueryPage { /** * @param $db DatabaseBase - * @param $res - * @return void + * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { # There's no point doing a batch check if we aren't caching results; @@ -79,6 +78,11 @@ class ShortPagesPage extends QueryPage { return false; } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { $dm = $this->getLanguage()->getDirMark(); diff --git a/includes/specials/SpecialSpecialpages.php b/includes/specials/SpecialSpecialpages.php index b763322457..390107439e 100644 --- a/includes/specials/SpecialSpecialpages.php +++ b/includes/specials/SpecialSpecialpages.php @@ -60,6 +60,7 @@ class SpecialSpecialpages extends UnlistedSpecialPage { /** Put them into a sortable array */ $groups = array(); + /** @var SpecialPage $page */ foreach ( $pages as $page ) { if ( $page->isListed() ) { $group = $page->getFinalGroupName(); diff --git a/includes/specials/SpecialUncategorizedcategories.php b/includes/specials/SpecialUncategorizedcategories.php index ebc32cf533..1cc40a9e90 100644 --- a/includes/specials/SpecialUncategorizedcategories.php +++ b/includes/specials/SpecialUncategorizedcategories.php @@ -34,8 +34,8 @@ class UncategorizedCategoriesPage extends UncategorizedPagesPage { /** * Formats the result - * @param $skin The current skin - * @param $result The query result + * @param Skin $skin The current skin + * @param object $result The query result * @return string The category link */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 0e8cf580e8..70a34e3639 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -271,7 +271,7 @@ class PageArchive { /** * Get the text from an archive row containing ar_text, ar_flags and ar_text_id * - * @param Object $row Database row + * @param object $row Database row * @return string */ function getTextFromRow( $row ) { diff --git a/includes/specials/SpecialUnusedcategories.php b/includes/specials/SpecialUnusedcategories.php index 6b91dd399e..2aad09ea95 100644 --- a/includes/specials/SpecialUnusedcategories.php +++ b/includes/specials/SpecialUnusedcategories.php @@ -60,6 +60,11 @@ class UnusedCategoriesPage extends QueryPage { return false; } + /** + * @param Skin $skin + * @param object $result Result row + * @return string + */ function formatResult( $skin, $result ) { $title = Title::makeTitle( NS_CATEGORY, $result->title ); return Linker::link( $title, htmlspecialchars( $title->getText() ) ); diff --git a/includes/specials/SpecialUnusedtemplates.php b/includes/specials/SpecialUnusedtemplates.php index 493e936a8d..a8bb128212 100644 --- a/includes/specials/SpecialUnusedtemplates.php +++ b/includes/specials/SpecialUnusedtemplates.php @@ -63,8 +63,8 @@ class UnusedtemplatesPage extends QueryPage { } /** - * @param $skin Skin - * @param $result + * @param Skin $skin + * @param object $result Result row * @return string */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialUnwatchedpages.php b/includes/specials/SpecialUnwatchedpages.php index 05ec6b02e4..2a57bc88e3 100644 --- a/includes/specials/SpecialUnwatchedpages.php +++ b/includes/specials/SpecialUnwatchedpages.php @@ -68,8 +68,8 @@ class UnwatchedpagesPage extends QueryPage { } /** - * @param $skin Skin - * @param $result + * @param Skin $skin + * @param object $result Result row * @return string */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 7935d13c32..7501371014 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -45,6 +45,11 @@ class UserrightsPage extends SpecialPage { return $this->userCanChangeRights( $user, false ); } + /** + * @param User $user + * @param bool $checkIfSelf + * @return bool + */ public function userCanChangeRights( $user, $checkIfSelf = true ) { $available = $this->changeableGroups(); if ( $user->getId() == 0 ) { diff --git a/includes/specials/SpecialWantedcategories.php b/includes/specials/SpecialWantedcategories.php index 0035bfabfb..ecd20cee26 100644 --- a/includes/specials/SpecialWantedcategories.php +++ b/includes/specials/SpecialWantedcategories.php @@ -49,8 +49,8 @@ class WantedCategoriesPage extends WantedQueryPage { } /** - * @param $skin Skin - * @param $result + * @param Skin $skin + * @param object $result Result row * @return string */ function formatResult( $skin, $result ) {