r89043 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89042‎ | r89043 | r89044 >
Date:16:31, 28 May 2011
Author:reedy
Status:ok
Tags:
Comment:
And some more parameter documentation!!
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Feed.php (modified) (history)
  • /trunk/phase3/includes/Metadata.php (modified) (history)
  • /trunk/phase3/includes/Pager.php (modified) (history)
  • /trunk/phase3/includes/actions/CreditsAction.php (modified) (history)
  • /trunk/phase3/includes/cache/HTMLFileCache.php (modified) (history)
  • /trunk/phase3/includes/media/JpegOrTiff.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialFilepath.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMIMEsearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialTags.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -864,7 +864,7 @@
865865 /**
866866 * Get a list of users who have edited this article, not including the user who made
867867 * the most recent revision, which you can get from $article->getUser() if you want it
868 - * @return UserArray
 868+ * @return UserArrayFromResult
869869 */
870870 public function getContributors() {
871871 # @todo FIXME: This is expensive; cache this info somewhere.
Index: trunk/phase3/includes/Feed.php
@@ -36,9 +36,8 @@
3737 * @ingroup Feed
3838 */
3939 class FeedItem {
40 - /**#@+
41 - * @var string
42 - * @private
 40+ /**
 41+ * @var Title
4342 */
4443 var $Title = 'Wiki';
4544 var $Description = '';
@@ -47,12 +46,11 @@
4847 var $Author = '';
4948 var $UniqueId = '';
5049 var $RSSIsPermalink;
51 - /**#@-*/
5250
5351 /**
5452 * Constructor
5553 *
56 - * @param $Title String: Item's title
 54+ * @param $Title String|Title Item's title
5755 * @param $Description String
5856 * @param $Url String: URL uniquely designating the item.
5957 * @param $Date String: Item's date
Index: trunk/phase3/includes/actions/CreditsAction.php
@@ -119,7 +119,7 @@
120120
121121 # Sift for real versus user names
122122 foreach ( $contributors as $user ) {
123 - $cnt--;
 123+ $cnt--;
124124 if ( $user->isLoggedIn() ) {
125125 $link = self::link( $user );
126126 if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) {
Index: trunk/phase3/includes/media/JpegOrTiff.php
@@ -95,6 +95,10 @@
9696 return self::METADATA_GOOD;
9797 }
9898
 99+ /**
 100+ * @param $image File
 101+ * @return array|bool
 102+ */
99103 function formatMetadata( $image ) {
100104 $metadata = $image->getMetadata();
101105 if ( !$metadata ||
@@ -116,8 +120,8 @@
117121 return $this->formatMetadataHelper( $exif );
118122 }
119123
120 - function getMetadataType( $image ) {
121 - return 'exif';
122 - }
 124+ function getMetadataType( $image ) {
 125+ return 'exif';
 126+ }
123127 }
124128
Index: trunk/phase3/includes/cache/HTMLFileCache.php
@@ -119,6 +119,8 @@
120120 /**
121121 * Check if up to date cache file exists
122122 * @param $timestamp string
 123+ *
 124+ * @return bool
123125 */
124126 public function isFileCacheGood( $timestamp = '' ) {
125127 global $wgCacheEpoch;
Index: trunk/phase3/includes/specials/SpecialFilepath.php
@@ -70,6 +70,9 @@
7171 }
7272 }
7373
 74+ /**
 75+ * @param $title Title
 76+ */
7477 function showForm( $title ) {
7578 global $wgOut, $wgScript;
7679
Index: trunk/phase3/includes/specials/SpecialTags.php
@@ -63,8 +63,8 @@
6464 }
6565
6666 function doTagRow( $tag, $hitcount ) {
67 - static $sk=null, $doneTags=array();
68 - if (!$sk) {
 67+ static $sk = null, $doneTags = array();
 68+ if ( !$sk ) {
6969 global $wgUser;
7070 $sk = $wgUser->getSkin();
7171 }
Index: trunk/phase3/includes/specials/SpecialMIMEsearch.php
@@ -107,6 +107,10 @@
108108 return "($download) $plink . . $dimensions . . $bytes . . $user . . $time";
109109 }
110110
 111+ /**
 112+ * @param $type string
 113+ * @return bool
 114+ */
111115 protected static function isValidType( $type ) {
112116 // From maintenance/tables.sql => img_major_mime
113117 $types = array(
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -29,6 +29,10 @@
3030 */
3131 class SpecialMergeHistory extends SpecialPage {
3232 var $mAction, $mTarget, $mDest, $mTimestamp, $mTargetID, $mDestID, $mComment;
 33+
 34+ /**
 35+ * @var Title
 36+ */
3337 var $mTargetObj, $mDestObj;
3438
3539 public function __construct() {
Index: trunk/phase3/includes/Metadata.php
@@ -101,6 +101,10 @@
102102 }
103103 }
104104
 105+ /**
 106+ * @param $name string
 107+ * @param $title Title
 108+ */
105109 protected function page( $name, $title ) {
106110 $this->url( $name, $title->getFullUrl() );
107111 }
Index: trunk/phase3/includes/Pager.php
@@ -93,6 +93,8 @@
9494
9595 /**
9696 * Result object for the query. Warning: seek before use.
 97+ *
 98+ * @var ResultWrapper
9799 */
98100 public $mResult;
99101

Status & tagging log