r60694 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60693‎ | r60694 | r60695 >
Date:21:24, 5 January 2010
Author:ialex
Status:ok
Tags:
Comment:
Fix some doxygen warnings
Modified paths:
  • /trunk/phase3/includes/AuthPlugin.php (modified) (history)
  • /trunk/phase3/includes/BacklinkCache.php (modified) (history)
  • /trunk/phase3/includes/CacheDependency.php (modified) (history)
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CacheDependency.php
@@ -12,8 +12,8 @@
1313
1414 /**
1515 * Create an instance.
16 - * @param mixed $value The user-supplied value
17 - * @param mixed $deps A dependency or dependency array. All dependencies
 16+ * @param $value Mixed: the user-supplied value
 17+ * @param $deps Mixed: a dependency or dependency array. All dependencies
1818 * must be objects implementing CacheDependency.
1919 */
2020 function __construct( $value = false, $deps = array() ) {
@@ -66,12 +66,12 @@
6767 * it will be generated with the callback function (if present), and the newly
6868 * calculated value will be stored to the cache in a wrapper.
6969 *
70 - * @param object $cache A cache object such as $wgMemc
71 - * @param string $key The cache key
72 - * @param integer $expiry The expiry timestamp or interval in seconds
73 - * @param mixed $callback The callback for generating the value, or false
74 - * @param array $callbackParams The function parameters for the callback
75 - * @param array $deps The dependencies to store on a cache miss. Note: these
 70+ * @param $cache Object: a cache object such as $wgMemc
 71+ * @param $key String: the cache key
 72+ * @param $expiry Integer: the expiry timestamp or interval in seconds
 73+ * @param $callback Mixed: the callback for generating the value, or false
 74+ * @param $callbackParams Array: the function parameters for the callback
 75+ * @param $deps Array: the dependencies to store on a cache miss. Note: these
7676 * are not the dependencies used on a cache hit! Cache hits use the stored
7777 * dependency array.
7878 *
@@ -120,8 +120,8 @@
121121 /**
122122 * Create a file dependency
123123 *
124 - * @param string $filename The name of the file, preferably fully qualified
125 - * @param mixed $timestamp The unix last modified timestamp, or false if the
 124+ * @param $filename String: the name of the file, preferably fully qualified
 125+ * @param $timestamp Mixed: the unix last modified timestamp, or false if the
126126 * file does not exist. If omitted, the timestamp will be loaded from
127127 * the file.
128128 *
@@ -185,7 +185,7 @@
186186
187187 /**
188188 * Construct a title dependency
189 - * @param Title $title
 189+ * @param $title Title
190190 */
191191 function __construct( Title $title ) {
192192 $this->titleObj = $title;
Index: trunk/phase3/includes/BacklinkCache.php
@@ -47,7 +47,9 @@
4848
4949 /**
5050 * Get the backlinks for a given table. Cached in process memory only.
51 - * @param string $table
 51+ * @param $table String
 52+ * @param $startId Integer or false
 53+ * @param $endId Integer or false
5254 * @return TitleArray
5355 */
5456 public function getLinks( $table, $startId = false, $endId = false ) {
@@ -169,9 +171,9 @@
170172 * Returns an array giving the start and end of each range. The first batch has
171173 * a start of false, and the last batch has an end of false.
172174 *
173 - * @param string $table The links table name
174 - * @param integer $batchSize
175 - * @return array
 175+ * @param $table String: the links table name
 176+ * @param $batchSize Integer
 177+ * @return Array
176178 */
177179 public function partition( $table, $batchSize ) {
178180 // Try cache
Index: trunk/phase3/includes/ChangesList.php
@@ -29,7 +29,7 @@
3030
3131 /**
3232 * Changeslist contructor
33 - * @param Skin $skin
 33+ * @param $skin Skin
3434 */
3535 public function __construct( $skin ) {
3636 $this->skin = $skin;
@@ -56,7 +56,7 @@
5757
5858 /**
5959 * Sets the list to use a <li class="watchlist-(namespace)-(page)"> tag
60 - * @param bool $value
 60+ * @param $value Boolean
6161 */
6262 public function setWatchlistDivs( $value = true ) {
6363 $this->watchlist = $value;
@@ -78,12 +78,12 @@
7979
8080 /**
8181 * Returns the appropriate flags for new page, minor change and patrolling
82 - * @param bool $new
83 - * @param bool $minor
84 - * @param bool $patrolled
85 - * @param string $nothing, string to use for empty space
86 - * @param bool $bot
87 - * @return string
 82+ * @param $new Boolean
 83+ * @param $minor Boolean
 84+ * @param $patrolled Boolean
 85+ * @param $nothing String to use for empty space
 86+ * @param $bot Boolean
 87+ * @return String
8888 */
8989 protected function recentChangesFlags( $new, $minor, $patrolled, $nothing = '&nbsp;', $bot = false ) {
9090 $f = $new ? self::flag( 'newpage' ) : $nothing;
@@ -99,8 +99,8 @@
100100 * unpatrolled edit. By default in English it will contain "N", "m", "b",
101101 * "!" respectively, plus it will have an appropriate title and class.
102102 *
103 - * @param $key string 'newpage', 'unpatrolled', 'minor', or 'bot'
104 - * @return string Raw HTML
 103+ * @param $key String: 'newpage', 'unpatrolled', 'minor', or 'bot'
 104+ * @return String: Raw HTML
105105 */
106106 public static function flag( $key ) {
107107 static $messages = null;
@@ -128,8 +128,8 @@
129129 * explaining what the flags mean. For instance, "N - new page". See
130130 * also flag().
131131 *
132 - * @param $key string 'newpage', 'unpatrolled', 'minor', or 'bot'
133 - * @return string Raw HTML
 132+ * @param $key String: 'newpage', 'unpatrolled', 'minor', or 'bot'
 133+ * @return String: Raw HTML
134134 */
135135 private static function flagLine( $key ) {
136136 return wfMsgExt( "recentchanges-legend-$key", array( 'escapenoentities',
@@ -139,7 +139,7 @@
140140 /**
141141 * A handy legend to tell users what the little "m", "b", and so on mean.
142142 *
143 - * @return string Raw HTML
 143+ * @return String: Raw HTML
144144 */
145145 public static function flagLegend() {
146146 global $wgGroupPermissions, $wgLang;
@@ -166,7 +166,7 @@
167167
168168 /**
169169 * Returns text for the start of the tabular part of RC
170 - * @return string
 170+ * @return String
171171 */
172172 public function beginRecentChangesList() {
173173 $this->rc_cache = array();
@@ -179,9 +179,9 @@
180180
181181 /**
182182 * Show formatted char difference
183 - * @param int $old bytes
184 - * @param int $new bytes
185 - * @returns string
 183+ * @param $old Integer: bytes
 184+ * @param $new Integer: bytes
 185+ * @returns String
186186 */
187187 public static function showCharacterDifference( $old, $new ) {
188188 global $wgRCChangedSizeThreshold, $wgLang, $wgMiserMode;
@@ -215,7 +215,7 @@
216216
217217 /**
218218 * Returns text for the end of RC
219 - * @return string
 219+ * @return String
220220 */
221221 public function endRecentChangesList() {
222222 if( $this->rclistOpen ) {
@@ -404,7 +404,7 @@
405405
406406 /**
407407 * Check whether to enable recent changes patrol features
408 - * @return bool
 408+ * @return Boolean
409409 */
410410 public static function usePatrol() {
411411 global $wgUser;
@@ -430,9 +430,9 @@
431431
432432 /**
433433 * Determine if said field of a revision is hidden
434 - * @param RCCacheEntry $rc
435 - * @param int $field one of DELETED_* bitfield constants
436 - * @return bool
 434+ * @param $rc RCCacheEntry
 435+ * @param $field Integer: one of DELETED_* bitfield constants
 436+ * @return Boolean
437437 */
438438 public static function isDeleted( $rc, $field ) {
439439 return ( $rc->mAttribs['rc_deleted'] & $field ) == $field;
@@ -441,9 +441,9 @@
442442 /**
443443 * Determine if the current user is allowed to view a particular
444444 * field of this revision, if it's marked as deleted.
445 - * @param RCCacheEntry $rc
446 - * @param int $field
447 - * @return bool
 445+ * @param $rc RCCacheEntry
 446+ * @param $field Integer
 447+ * @return Boolean
448448 */
449449 public static function userCan( $rc, $field ) {
450450 if( $rc->mAttribs['rc_type'] == RC_LOG ) {
@@ -591,9 +591,9 @@
592592 */
593593 class EnhancedChangesList extends ChangesList {
594594 /**
595 - * Add the JavaScript file for enhanced changeslist
596 - * @ return string
597 - */
 595+ * Add the JavaScript file for enhanced changeslist
 596+ * @return String
 597+ */
598598 public function beginRecentChangesList() {
599599 global $wgStylePath, $wgStyleVersion;
600600 $this->rc_cache = array();
@@ -1021,10 +1021,10 @@
10221022
10231023 /**
10241024 * Generate HTML for an arrow or placeholder graphic
1025 - * @param string $dir one of '', 'd', 'l', 'r'
1026 - * @param string $alt text
1027 - * @param string $title text
1028 - * @return string HTML <img> tag
 1025+ * @param $dir String: one of '', 'd', 'l', 'r'
 1026+ * @param $alt String: text
 1027+ * @param $title String: text
 1028+ * @return String: HTML <img> tag
10291029 */
10301030 protected function arrow( $dir, $alt='', $title='' ) {
10311031 global $wgStylePath;
@@ -1037,7 +1037,7 @@
10381038 /**
10391039 * Generate HTML for a right- or left-facing arrow,
10401040 * depending on language direction.
1041 - * @return string HTML <img> tag
 1041+ * @return String: HTML <img> tag
10421042 */
10431043 protected function sideArrow() {
10441044 global $wgContLang;
@@ -1048,7 +1048,7 @@
10491049 /**
10501050 * Generate HTML for a down-facing arrow
10511051 * depending on language direction.
1052 - * @return string HTML <img> tag
 1052+ * @return String: HTML <img> tag
10531053 */
10541054 protected function downArrow() {
10551055 return $this->arrow( 'd', '-', wfMsg( 'rc-enhanced-hide' ) );
@@ -1056,7 +1056,7 @@
10571057
10581058 /**
10591059 * Generate HTML for a spacer image
1060 - * @return string HTML <img> tag
 1060+ * @return String: HTML <img> tag
10611061 */
10621062 protected function spacerArrow() {
10631063 return $this->arrow( '', codepointToUtf8( 0xa0 ) ); // non-breaking space
@@ -1064,7 +1064,7 @@
10651065
10661066 /**
10671067 * Add a set of spaces
1068 - * @return string HTML <td> tag
 1068+ * @return String: HTML <td> tag
10691069 */
10701070 protected function spacerIndent() {
10711071 return '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
@@ -1072,7 +1072,7 @@
10731073
10741074 /**
10751075 * Enhanced RC ungrouped line.
1076 - * @return string a HTML formated line (generated using $r)
 1076+ * @return String: a HTML formated line (generated using $r)
10771077 */
10781078 protected function recentChangesBlockLine( $rcObj ) {
10791079 global $wgRCShowChangedSize;
Index: trunk/phase3/includes/AuthPlugin.php
@@ -98,7 +98,7 @@
9999 * The User object is passed by reference so it can be modified; don't
100100 * forget the & on your function declaration.
101101 *
102 - * @param User $user
 102+ * @param $user User object
103103 */
104104 public function updateUser( &$user ) {
105105 # Override this and do something
@@ -117,7 +117,7 @@
118118 *
119119 * This is just a question, and shouldn't perform any actions.
120120 *
121 - * @return bool
 121+ * @return Boolean
122122 */
123123 public function autoCreate() {
124124 return false;
@@ -128,7 +128,7 @@
129129 * and use the same keys. 'Realname' 'Emailaddress' and 'Nickname'
130130 * all reference this.
131131 *
132 - * @return bool
 132+ * @return Boolean
133133 */
134134 public function allowPropChange( $prop = '' ) {
135135 if( $prop == 'realname' && is_callable( array( $this, 'allowRealNameChange' ) ) ) {
@@ -172,7 +172,7 @@
173173 * Return true if successful.
174174 *
175175 * @param $user User object.
176 - * @return bool
 176+ * @return Boolean
177177 */
178178 public function updateExternalDB( $user ) {
179179 return true;
@@ -181,7 +181,7 @@
182182 /**
183183 * Check to see if external accounts can be created.
184184 * Return true if external accounts can be created.
185 - * @return bool
 185+ * @return Boolean
186186 */
187187 public function canCreateAccounts() {
188188 return false;
@@ -191,11 +191,11 @@
192192 * Add a user to the external authentication database.
193193 * Return true if successful.
194194 *
195 - * @param User $user - only the name should be assumed valid at this point
196 - * @param string $password
197 - * @param string $email
198 - * @param string $realname
199 - * @return bool
 195+ * @param $user User: only the name should be assumed valid at this point
 196+ * @param $password String
 197+ * @param $email String
 198+ * @param $realname String
 199+ * @return Boolean
200200 */
201201 public function addUser( $user, $password, $email='', $realname='' ) {
202202 return true;
@@ -208,7 +208,7 @@
209209 *
210210 * This is just a question, and shouldn't perform any actions.
211211 *
212 - * @return bool
 212+ * @return Boolean
213213 */
214214 public function strict() {
215215 return false;
@@ -219,7 +219,7 @@
220220 * If either this or strict() returns true, local authentication is not used.
221221 *
222222 * @param $username String: username.
223 - * @return bool
 223+ * @return Boolean
224224 */
225225 public function strictUserAuth( $username ) {
226226 return false;
@@ -234,7 +234,7 @@
235235 * forget the & on your function declaration.
236236 *
237237 * @param $user User object.
238 - * @param $autocreate bool True if user is being autocreated on login
 238+ * @param $autocreate Boolean: True if user is being autocreated on login
239239 */
240240 public function initUser( &$user, $autocreate=false ) {
241241 # Override this to do something.
@@ -252,7 +252,6 @@
253253 * Get an instance of a User object
254254 *
255255 * @param $user User
256 - * @public
257256 */
258257 public function getUserInstance( User &$user ) {
259258 return new AuthPluginUser( $user );

Status & tagging log