r88397 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88396‎ | r88397 | r88398 >
Date:00:03, 19 May 2011
Author:reedy
Status:ok
Tags:
Comment:
Add/remove/tweak method documentation
Modified paths:
  • /trunk/phase3/includes/AuthPlugin.php (modified) (history)
  • /trunk/phase3/includes/Categoryfinder.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)
  • /trunk/phase3/includes/LogPage.php (modified) (history)
  • /trunk/phase3/includes/Sanitizer.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)
  • /trunk/phase3/includes/db/LoadMonitor.php (modified) (history)
  • /trunk/phase3/includes/media/Generic.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Categoryfinder.php
@@ -86,9 +86,9 @@
8787
8888 /**
8989 * This functions recurses through the parent representation, trying to match the conditions
90 - * @param $id The article/category to check
91 - * @param $conds The array of categories to match
92 - * @param $path used to check for recursion loops
 90+ * @param $id int The article/category to check
 91+ * @param $conds array The array of categories to match
 92+ * @param $path array used to check for recursion loops
9393 * @return bool Does this match the conditions?
9494 */
9595 function check( $id, &$conds, $path = array() ) {
Index: trunk/phase3/includes/User.php
@@ -3693,6 +3693,8 @@
36943694 *
36953695 * @param $byEmail Boolean: account made by email?
36963696 * @param $reason String: user supplied reason
 3697+ *
 3698+ * @return true
36973699 */
36983700 public function addNewUserLogEntry( $byEmail = false, $reason = '' ) {
36993701 global $wgUser, $wgContLang, $wgNewUserLog;
@@ -3726,6 +3728,8 @@
37273729 /**
37283730 * Add an autocreate newuser log entry for this user
37293731 * Used by things like CentralAuth and perhaps other authplugins.
 3732+ *
 3733+ * @return true
37303734 */
37313735 public function addNewUserLogEntryAutoCreate() {
37323736 global $wgNewUserLog;
Index: trunk/phase3/includes/GlobalFunctions.php
@@ -3305,7 +3305,7 @@
33063306 * Generate a random 32-character hexadecimal token.
33073307 * @param $salt Mixed: some sort of salt, if necessary, to add to random
33083308 * characters before hashing.
3309 - * @return Array
 3309+ * @return string
33103310 * @codeCoverageIgnore
33113311 */
33123312 function wfGenerateToken( $salt = '' ) {
Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -27,8 +27,7 @@
2828 * masterWaitTimeout Replication lag wait timeout
2929 * loadMonitor Name of a class used to fetch server lag and load.
3030 */
31 - function __construct( $params )
32 - {
 31+ function __construct( $params ) {
3332 if ( !isset( $params['servers'] ) ) {
3433 throw new MWException( __CLASS__.': missing servers parameter' );
3534 }
Index: trunk/phase3/includes/db/LoadMonitor.php
@@ -21,7 +21,7 @@
2222
2323 /**
2424 * Perform pre-connection load ratio adjustment.
25 - * @param $loads Array
 25+ * @param $loads array
2626 * @param $group String: the selected query group
2727 * @param $wiki String
2828 */
Index: trunk/phase3/includes/Sanitizer.php
@@ -1282,7 +1282,7 @@
12831283 * return the UTF-8 encoding of that character. Otherwise, returns
12841284 * pseudo-entity source (eg &foo;)
12851285 *
1286 - * @param $name Strings
 1286+ * @param $name String
12871287 * @return String
12881288 */
12891289 static function decodeEntity( $name ) {
Index: trunk/phase3/includes/media/Generic.php
@@ -349,7 +349,7 @@
350350 * @param &$array Array An array containing elements for each type of visibility
351351 * and each of those elements being an array of metadata items. This function adds
352352 * a value to that array.
353 - * @param $visibility String ('visible' or 'collapsed') if this value is hidden
 353+ * @param $visibility string ('visible' or 'collapsed') if this value is hidden
354354 * by default.
355355 * @param $type String type of metadata tag (currently always 'exif')
356356 * @param $id String the name of the metadata tag (like 'artist' for example).
@@ -362,8 +362,6 @@
363363 * @param $param String value to pass to the message for the name of the field
364364 * as $1. Currently this parameter doesn't seem to ever be used.
365365 *
366 - * @return Array $array but with the new metadata field added.
367 - *
368366 * Note, everything here is passed through the parser later on (!)
369367 */
370368 protected static function addMeta( &$array, $visibility, $type, $id, $value, $param = false ) {
Index: trunk/phase3/includes/AuthPlugin.php
@@ -131,6 +131,8 @@
132132 * and use the same keys. 'Realname' 'Emailaddress' and 'Nickname'
133133 * all reference this.
134134 *
 135+ * @param $prop string
 136+ *
135137 * @return Boolean
136138 */
137139 public function allowPropChange( $prop = '' ) {
@@ -254,6 +256,8 @@
255257 * Get an instance of a User object
256258 *
257259 * @param $user User
 260+ *
 261+ * @return AuthPluginUser
258262 */
259263 public function getUserInstance( User &$user ) {
260264 return new AuthPluginUser( $user );
Index: trunk/phase3/includes/LogPage.php
@@ -514,7 +514,7 @@
515515 /**
516516 * Translate a block log flag if possible
517517 *
518 - * @param $flag Flag to translate
 518+ * @param $flag int Flag to translate
519519 * @param $forContent Whether to localize the message depending of the user
520520 * language
521521 * @return String

Status & tagging log