From ba2c3a793d33050a8c2f1fdb5037f67f949579c6 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 29 May 2011 14:25:20 +0000 Subject: [PATCH] And even more documentation in various files --- includes/Revision.php | 3 +++ includes/ZhClient.php | 7 ++++++- includes/objectcache/ObjectCache.php | 6 ++++++ includes/parser/CoreTagHooks.php | 4 ++-- includes/parser/LinkHolderArray.php | 2 +- includes/search/SearchMySQL.php | 3 +++ includes/search/SearchSqlite.php | 6 +++++- includes/specials/SpecialRecentchanges.php | 2 ++ includes/specials/SpecialStatistics.php | 3 +-- includes/upload/UploadFromStash.php | 2 ++ includes/upload/UploadStash.php | 2 ++ 11 files changed, 33 insertions(+), 7 deletions(-) diff --git a/includes/Revision.php b/includes/Revision.php index 66501d2965..0780f74cf1 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -67,6 +67,9 @@ class Revision { * for permissions or even inserted (as in Special:Undelete) * @todo FIXME: Should be a subclass for RevisionDelete. [TS] * + * @param $row + * @param $overrides array + * * @return Revision */ public static function newFromArchiveRow( $row, $overrides = array() ) { diff --git a/includes/ZhClient.php b/includes/ZhClient.php index 7807319e92..8bb36b231a 100644 --- a/includes/ZhClient.php +++ b/includes/ZhClient.php @@ -9,7 +9,10 @@ class ZhClient { /** * Constructor * - * @access private + * @param $host + * @param $port + * + * @return ZhClient */ function __construct( $host, $port ) { $this->mHost = $host; @@ -48,6 +51,8 @@ class ZhClient { * Query the daemon and return the result * * @access private + * + * @return string */ function query( $request ) { if ( !$this->mConnected ) { diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index a798203c0f..eebff32c9c 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -34,6 +34,10 @@ class ObjectCache { /** * Create a new cache object of the specified type. + * + * @param $id + * + * @return ObjectCache */ static function newFromId( $id ) { global $wgObjectCaches; @@ -50,6 +54,8 @@ class ObjectCache { * Create a new cache object from parameters * * @param $params array + * + * @return ObjectCache */ static function newFromParams( $params ) { if ( isset( $params['factory'] ) ) { diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php index 458088f0eb..7d488c4b69 100644 --- a/includes/parser/CoreTagHooks.php +++ b/includes/parser/CoreTagHooks.php @@ -54,7 +54,7 @@ class CoreTagHooks { * Uses undocumented extended tag hook return values, introduced in r61913. * * @param $content string - * @param $attribs array + * @param $attributes array * @param $parser Parser * @return array */ @@ -75,7 +75,7 @@ class CoreTagHooks { * Uses undocumented extended tag hook return values, introduced in r61913. * * @param $content string - * @param $attribs array + * @param $attributes array * @param $parser Parser * @return array */ diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index 835deb8284..5418b6e517 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -94,7 +94,7 @@ class LinkHolderArray { * strings will be returned. * * @param $other LinkHolderArray - * @param $text Array of strings + * @param $texts Array of strings * @return Array */ function mergeForeign( $other, $texts ) { diff --git a/includes/search/SearchMySQL.php b/includes/search/SearchMySQL.php index 51c73b6c09..a2c27ba73f 100644 --- a/includes/search/SearchMySQL.php +++ b/includes/search/SearchMySQL.php @@ -44,6 +44,9 @@ class SearchMySQL extends SearchEngine { * Parse the user's query and transform it into an SQL fragment which will * become part of a WHERE clause * + * @param $filteredText string + * @param $fullText string + * * @return string */ function parseQuery( $filteredText, $fulltext ) { diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php index d58b7b91d5..cd59eea985 100644 --- a/includes/search/SearchSqlite.php +++ b/includes/search/SearchSqlite.php @@ -51,6 +51,8 @@ class SearchSqlite extends SearchEngine { /** * Parse the user's query and transform it into an SQL fragment which will * become part of a WHERE clause + * + * @return string */ function parseQuery( $filteredText, $fulltext ) { global $wgContLang; @@ -72,7 +74,9 @@ class SearchSqlite extends SearchEngine { $quote = '"'; } - if( $searchon !== '' ) $searchon .= ' '; + if( $searchon !== '' ) { + $searchon .= ' '; + } // Some languages such as Serbian store the input form in the search index, // so we may need to search for matches in multiple writing system variants. diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index e67b1e416c..479a78ad34 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -66,6 +66,8 @@ class SpecialRecentChanges extends IncludableSpecialPage { /** * Create a FormOptions object with options as specified by the user * + * @param $parameters array + * * @return FormOptions */ public function setup( $parameters ) { diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index c9290f601c..fd23968c8d 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -124,8 +124,7 @@ class SpecialStatistics extends SpecialPage { " ($descriptionText)" ); } } - return - Html::rawElement( 'tr', $trExtraParams, + return Html::rawElement( 'tr', $trExtraParams, Html::rawElement( 'td', array(), $text ) . Html::rawElement( 'td', array( 'class' => 'mw-statistics-numbers' ), $number ) ); diff --git a/includes/upload/UploadFromStash.php b/includes/upload/UploadFromStash.php index 2ceea0d5cb..7077bcb4d0 100644 --- a/includes/upload/UploadFromStash.php +++ b/includes/upload/UploadFromStash.php @@ -73,6 +73,8 @@ class UploadFromStash extends UploadBase { /** * File has been previously verified so no need to do so again. + * + * @return bool */ protected function verifyFile() { return true; diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 7a3c01baba..2412643bc4 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -34,6 +34,8 @@ class UploadStash { /** * Represents the session which contains temporarily stored files. * Designed to be compatible with the session stashing code in UploadBase (should replace it eventually) + * + * @param $repo FileRepo */ public function __construct( $repo ) { -- 2.20.1