From 50d5b074d0a7fff67a224d40fdc6404ee62181a2 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 28 May 2011 16:31:00 +0000 Subject: [PATCH] And some more parameter documentation!! --- includes/Article.php | 2 +- includes/Feed.php | 8 +++----- includes/Metadata.php | 4 ++++ includes/Pager.php | 2 ++ includes/actions/CreditsAction.php | 2 +- includes/cache/HTMLFileCache.php | 2 ++ includes/media/JpegOrTiff.php | 10 +++++++--- includes/specials/SpecialFilepath.php | 3 +++ includes/specials/SpecialMIMEsearch.php | 4 ++++ includes/specials/SpecialMergeHistory.php | 4 ++++ includes/specials/SpecialTags.php | 4 ++-- 11 files changed, 33 insertions(+), 12 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 915ee7a415..a5110f47bd 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -864,7 +864,7 @@ class Article { /** * Get a list of users who have edited this article, not including the user who made * the most recent revision, which you can get from $article->getUser() if you want it - * @return UserArray + * @return UserArrayFromResult */ public function getContributors() { # @todo FIXME: This is expensive; cache this info somewhere. diff --git a/includes/Feed.php b/includes/Feed.php index e22ed9383b..528b5f5306 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -36,9 +36,8 @@ * @ingroup Feed */ class FeedItem { - /**#@+ - * @var string - * @private + /** + * @var Title */ var $Title = 'Wiki'; var $Description = ''; @@ -47,12 +46,11 @@ class FeedItem { var $Author = ''; var $UniqueId = ''; var $RSSIsPermalink; - /**#@-*/ /** * Constructor * - * @param $Title String: Item's title + * @param $Title String|Title Item's title * @param $Description String * @param $Url String: URL uniquely designating the item. * @param $Date String: Item's date diff --git a/includes/Metadata.php b/includes/Metadata.php index 463b497c2f..62d10430b8 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -101,6 +101,10 @@ abstract class RdfMetaData { } } + /** + * @param $name string + * @param $title Title + */ protected function page( $name, $title ) { $this->url( $name, $title->getFullUrl() ); } diff --git a/includes/Pager.php b/includes/Pager.php index fb657f8df9..c10dd9557e 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -93,6 +93,8 @@ abstract class IndexPager implements Pager { /** * Result object for the query. Warning: seek before use. + * + * @var ResultWrapper */ public $mResult; diff --git a/includes/actions/CreditsAction.php b/includes/actions/CreditsAction.php index 26bb70b094..9ce7963eb3 100644 --- a/includes/actions/CreditsAction.php +++ b/includes/actions/CreditsAction.php @@ -119,7 +119,7 @@ class CreditsAction extends FormlessAction { # Sift for real versus user names foreach ( $contributors as $user ) { - $cnt--; + $cnt--; if ( $user->isLoggedIn() ) { $link = self::link( $user ); if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) { diff --git a/includes/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php index 31d92ff843..3b3ce967e5 100644 --- a/includes/cache/HTMLFileCache.php +++ b/includes/cache/HTMLFileCache.php @@ -119,6 +119,8 @@ class HTMLFileCache { /** * Check if up to date cache file exists * @param $timestamp string + * + * @return bool */ public function isFileCacheGood( $timestamp = '' ) { global $wgCacheEpoch; diff --git a/includes/media/JpegOrTiff.php b/includes/media/JpegOrTiff.php index 767cb19ea0..d48350053b 100644 --- a/includes/media/JpegOrTiff.php +++ b/includes/media/JpegOrTiff.php @@ -95,6 +95,10 @@ class JpegOrTiffHandler extends BitmapHandler { return self::METADATA_GOOD; } + /** + * @param $image File + * @return array|bool + */ function formatMetadata( $image ) { $metadata = $image->getMetadata(); if ( !$metadata || @@ -116,8 +120,8 @@ class JpegOrTiffHandler extends BitmapHandler { return $this->formatMetadataHelper( $exif ); } - function getMetadataType( $image ) { - return 'exif'; - } + function getMetadataType( $image ) { + return 'exif'; + } } diff --git a/includes/specials/SpecialFilepath.php b/includes/specials/SpecialFilepath.php index 744940f36c..bcf696585a 100644 --- a/includes/specials/SpecialFilepath.php +++ b/includes/specials/SpecialFilepath.php @@ -70,6 +70,9 @@ class SpecialFilepath extends SpecialPage { } } + /** + * @param $title Title + */ function showForm( $title ) { global $wgOut, $wgScript; diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index a64b287064..aefe7bf599 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -107,6 +107,10 @@ class MIMEsearchPage extends QueryPage { return "($download) $plink . . $dimensions . . $bytes . . $user . . $time"; } + /** + * @param $type string + * @return bool + */ protected static function isValidType( $type ) { // From maintenance/tables.sql => img_major_mime $types = array( diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index 99d339468f..916230ca98 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -29,6 +29,10 @@ */ class SpecialMergeHistory extends SpecialPage { var $mAction, $mTarget, $mDest, $mTimestamp, $mTargetID, $mDestID, $mComment; + + /** + * @var Title + */ var $mTargetObj, $mDestObj; public function __construct() { diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index d3f4e7df5b..add54c1b92 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -63,8 +63,8 @@ class SpecialTags extends SpecialPage { } function doTagRow( $tag, $hitcount ) { - static $sk=null, $doneTags=array(); - if (!$sk) { + static $sk = null, $doneTags = array(); + if ( !$sk ) { global $wgUser; $sk = $wgUser->getSkin(); } -- 2.20.1