From 8b03a013a1456e69e12fddcd35624ade624fafee Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 20 Oct 2010 18:50:33 +0000 Subject: [PATCH] Fix some method documentation Fix some typos Some explicit class members --- includes/Title.php | 4 ++-- includes/api/ApiDelete.php | 2 +- includes/api/ApiPageSet.php | 4 ++-- includes/api/ApiParse.php | 2 ++ includes/api/ApiQuery.php | 18 +++++++++--------- includes/api/ApiQueryRecentChanges.php | 2 +- includes/api/ApiQueryRevisions.php | 2 ++ includes/api/ApiQueryUserContributions.php | 2 +- 8 files changed, 20 insertions(+), 16 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 5e136fc263..4db46f278c 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2740,7 +2740,7 @@ class Title { /** * Get a Title object associated with the talk page of this article * - * @return \type{Title} the object for the talk page + * @return Title the object for the talk page */ public function getTalkPage() { return Title::makeTitle( MWNamespace::getTalk( $this->getNamespace() ), $this->getDBkey() ); @@ -2750,7 +2750,7 @@ class Title { * Get a title object associated with the subject page of this * talk page * - * @return \type{Title} the object for the subject page + * @return Title the object for the subject page */ public function getSubjectPage() { // Is this the same title? diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index 8202c60176..aefd7b36fd 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -30,7 +30,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { } /** - * API module that facilitates deleting pages. The API eqivalent of action=delete. + * API module that facilitates deleting pages. The API equivalent of action=delete. * Requires API write mode to be enabled. * * @ingroup API diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 2eafbb3d81..f54f1f8e84 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -347,7 +347,7 @@ class ApiPageSet extends ApiQueryBase { /** * Populate this PageSet from a rowset returned from the database * @param $db Database object - * @param $queryResult Query result object + * @param $queryResult ResultWrapper Query result object */ public function populateFromQueryResult( $db, $queryResult ) { $this->profileIn(); @@ -468,7 +468,7 @@ class ApiPageSet extends ApiQueryBase { * Iterate through the result of the query on 'page' table, * and for each row create and store title object and save any extra fields requested. * @param $db Database - * @param $res DB Query result + * @param $res ResultWrapper DB Query result * @param $remaining array of either pageID or ns/title elements (optional). * If given, any missing items will go to $mMissingPageIDs and $mMissingTitles * @param $processTitles bool Must be provided together with $remaining. diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index f5e520a305..c487ca855f 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -34,6 +34,8 @@ if ( !defined( 'MEDIAWIKI' ) ) { */ class ApiParse extends ApiBase { + private $section; + public function __construct( $main, $action ) { parent::__construct( $main, $action ); } diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 6027818193..31ce8a9b41 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -301,9 +301,9 @@ class ApiQuery extends ApiBase { /** * Create instances of all modules requested by the client - * @param $modules array to append instatiated modules to + * @param $modules Array to append instantiated modules to * @param $param string Parameter name to read modules from - * @param $moduleList array(modulename => classname) + * @param $moduleList Array array(modulename => classname) */ private function instantiateModules( &$modules, $param, $moduleList ) { $list = @$this->params[$param]; @@ -576,15 +576,15 @@ class ApiQuery extends ApiBase { $this->mPageSet = null; $this->mAllowedGenerators = array(); // Will be repopulated - $astriks = str_repeat( '--- ', 8 ); - $astriks2 = str_repeat( '*** ', 10 ); - $msg .= "\n$astriks Query: Prop $astriks\n\n"; + $asterisk = str_repeat( '--- ', 8 ); + $asterisk2 = str_repeat( '*** ', 10 ); + $msg .= "\n$asterisk Query: Prop $asterisk\n\n"; $msg .= $this->makeHelpMsgHelper( $this->mQueryPropModules, 'prop' ); - $msg .= "\n$astriks Query: List $astriks\n\n"; + $msg .= "\n$asterisk Query: List $asterisk\n\n"; $msg .= $this->makeHelpMsgHelper( $this->mQueryListModules, 'list' ); - $msg .= "\n$astriks Query: Meta $astriks\n\n"; + $msg .= "\n$asterisk Query: Meta $asterisk\n\n"; $msg .= $this->makeHelpMsgHelper( $this->mQueryMetaModules, 'meta' ); - $msg .= "\n\n$astriks2 Modules: continuation $astriks2\n\n"; + $msg .= "\n\n$asterisk2 Modules: continuation $asterisk2\n\n"; // Perform the base call last because the $this->mAllowedGenerators // will be updated inside makeHelpMsgHelper() @@ -596,7 +596,7 @@ class ApiQuery extends ApiBase { /** * For all modules in $moduleList, generate help messages and join them together - * @param $moduleList array(modulename => classname) + * @param $moduleList Array array(modulename => classname) * @param $paramName string Parameter name * @return string */ diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 0281a04789..32d1bf8b12 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -91,7 +91,7 @@ class ApiQueryRecentChanges extends ApiQueryBase { /** * Sets internal state to include the desired properties in the output. - * @param $prop associative array of properties, only keys are used here + * @param $prop Array associative array of properties, only keys are used here */ public function initProperties( $prop ) { $this->fld_comment = isset( $prop['comment'] ); diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index c495d3b7cb..355db5bfcc 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -46,6 +46,8 @@ class ApiQueryRevisions extends ApiQueryBase { $fld_comment = false, $fld_parsedcomment = false, $fld_user = false, $fld_userid = false, $fld_content = false, $fld_tags = false; + private $tokenFunctions; + protected function getTokenFunctions() { // tokenname => function // function prototype is func($pageid, $title, $rev) diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index e1646838d8..3be30238b1 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -40,7 +40,7 @@ class ApiQueryContributions extends ApiQueryBase { parent::__construct( $query, $moduleName, 'uc' ); } - private $params, $prefixMode, $userprefix, $multiUserMode; + private $params, $prefixMode, $userprefix, $multiUserMode, $usernames; private $fld_ids = false, $fld_title = false, $fld_timestamp = false, $fld_comment = false, $fld_parsedcomment = false, $fld_flags = false, $fld_patrolled = false, $fld_tags = false, $fld_size = false; -- 2.20.1