From 33ad682ab09876629059e3d86262c7a29f7d3171 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 19 May 2011 00:03:31 +0000 Subject: [PATCH] Add/remove/tweak method documentation --- includes/AuthPlugin.php | 4 ++++ includes/Categoryfinder.php | 6 +++--- includes/GlobalFunctions.php | 2 +- includes/LogPage.php | 2 +- includes/Sanitizer.php | 2 +- includes/User.php | 4 ++++ includes/db/LoadBalancer.php | 3 +-- includes/db/LoadMonitor.php | 2 +- includes/media/Generic.php | 4 +--- 9 files changed, 17 insertions(+), 12 deletions(-) diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php index 7dc9925962..1ce96c1ea1 100644 --- a/includes/AuthPlugin.php +++ b/includes/AuthPlugin.php @@ -131,6 +131,8 @@ class AuthPlugin { * and use the same keys. 'Realname' 'Emailaddress' and 'Nickname' * all reference this. * + * @param $prop string + * * @return Boolean */ public function allowPropChange( $prop = '' ) { @@ -254,6 +256,8 @@ class AuthPlugin { * Get an instance of a User object * * @param $user User + * + * @return AuthPluginUser */ public function getUserInstance( User &$user ) { return new AuthPluginUser( $user ); diff --git a/includes/Categoryfinder.php b/includes/Categoryfinder.php index cc9bf5e90e..2567de0d38 100644 --- a/includes/Categoryfinder.php +++ b/includes/Categoryfinder.php @@ -86,9 +86,9 @@ class Categoryfinder { /** * This functions recurses through the parent representation, trying to match the conditions - * @param $id The article/category to check - * @param $conds The array of categories to match - * @param $path used to check for recursion loops + * @param $id int The article/category to check + * @param $conds array The array of categories to match + * @param $path array used to check for recursion loops * @return bool Does this match the conditions? */ function check( $id, &$conds, $path = array() ) { diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index b5afa9d5cc..3945efe34d 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3305,7 +3305,7 @@ function wfCountDown( $n ) { * Generate a random 32-character hexadecimal token. * @param $salt Mixed: some sort of salt, if necessary, to add to random * characters before hashing. - * @return Array + * @return string * @codeCoverageIgnore */ function wfGenerateToken( $salt = '' ) { diff --git a/includes/LogPage.php b/includes/LogPage.php index 2d9304b43e..ee18d67e7a 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -514,7 +514,7 @@ class LogPage { /** * Translate a block log flag if possible * - * @param $flag Flag to translate + * @param $flag int Flag to translate * @param $forContent Whether to localize the message depending of the user * language * @return String diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index df62b5e9c8..dc75a03faf 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -1282,7 +1282,7 @@ class Sanitizer { * return the UTF-8 encoding of that character. Otherwise, returns * pseudo-entity source (eg &foo;) * - * @param $name Strings + * @param $name String * @return String */ static function decodeEntity( $name ) { diff --git a/includes/User.php b/includes/User.php index a6695024e6..186072c306 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3693,6 +3693,8 @@ class User { * * @param $byEmail Boolean: account made by email? * @param $reason String: user supplied reason + * + * @return true */ public function addNewUserLogEntry( $byEmail = false, $reason = '' ) { global $wgUser, $wgContLang, $wgNewUserLog; @@ -3726,6 +3728,8 @@ class User { /** * Add an autocreate newuser log entry for this user * Used by things like CentralAuth and perhaps other authplugins. + * + * @return true */ public function addNewUserLogEntryAutoCreate() { global $wgNewUserLog; diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index 9662b03cd4..a25aec4dc5 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -27,8 +27,7 @@ class LoadBalancer { * masterWaitTimeout Replication lag wait timeout * loadMonitor Name of a class used to fetch server lag and load. */ - function __construct( $params ) - { + function __construct( $params ) { if ( !isset( $params['servers'] ) ) { throw new MWException( __CLASS__.': missing servers parameter' ); } diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php index 2a23295997..36e9fce886 100644 --- a/includes/db/LoadMonitor.php +++ b/includes/db/LoadMonitor.php @@ -21,7 +21,7 @@ interface LoadMonitor { /** * Perform pre-connection load ratio adjustment. - * @param $loads Array + * @param $loads array * @param $group String: the selected query group * @param $wiki String */ diff --git a/includes/media/Generic.php b/includes/media/Generic.php index 92472f9667..7901fd7c80 100644 --- a/includes/media/Generic.php +++ b/includes/media/Generic.php @@ -349,7 +349,7 @@ abstract class MediaHandler { * @param &$array Array An array containing elements for each type of visibility * and each of those elements being an array of metadata items. This function adds * a value to that array. - * @param $visibility String ('visible' or 'collapsed') if this value is hidden + * @param $visibility string ('visible' or 'collapsed') if this value is hidden * by default. * @param $type String type of metadata tag (currently always 'exif') * @param $id String the name of the metadata tag (like 'artist' for example). @@ -362,8 +362,6 @@ abstract class MediaHandler { * @param $param String value to pass to the message for the name of the field * as $1. Currently this parameter doesn't seem to ever be used. * - * @return Array $array but with the new metadata field added. - * * Note, everything here is passed through the parser later on (!) */ protected static function addMeta( &$array, $visibility, $type, $id, $value, $param = false ) { -- 2.20.1