r97745 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97744‎ | r97745 | r97746 >
Date:16:36, 21 September 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Return documentation
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFeedContributions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFeedWatchlist.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserContributions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFormatBase.php
@@ -342,6 +342,8 @@
343343
344344 /**
345345 * Optimization - no need to sanitize data that will not be needed
 346+ *
 347+ * @return bool
346348 */
347349 public function getNeedsRawData() {
348350 return true;
Index: trunk/phase3/includes/api/ApiFeedContributions.php
@@ -36,6 +36,8 @@
3737
3838 /**
3939 * This module uses a custom feed wrapper printer.
 40+ *
 41+ * @return ApiFormatFeedWrapper
4042 */
4143 public function getCustomPrinter() {
4244 return new ApiFormatFeedWrapper( $this->getMain() );
Index: trunk/phase3/includes/api/ApiBase.php
@@ -655,6 +655,8 @@
656656
657657 /**
658658 * @deprecated since 1.17 use MWNamespace::getValidNamespaces()
 659+ *
 660+ * @return array
659661 */
660662 public static function getValidNamespaces() {
661663 return MWNamespace::getValidNamespaces();
@@ -1164,7 +1166,7 @@
11651167 'emptynewsection' => array( 'code' => 'emptynewsection', 'info' => 'Creating empty new sections is not possible.' ),
11661168 'revwrongpage' => array( 'code' => 'revwrongpage', 'info' => "r\$1 is not a revision of ``\$2''" ),
11671169 'undo-failure' => array( 'code' => 'undofailure', 'info' => 'Undo failed due to conflicting intermediate edits' ),
1168 -
 1170+
11691171 // Messages from WikiPage::doEit()
11701172 'edit-hook-aborted' => array( 'code' => 'edit-hook-aborted', 'info' => "Your edit was aborted by an ArticleSave hook" ),
11711173 'edit-gone-missing' => array( 'code' => 'edit-gone-missing', 'info' => "The page you tried to edit doesn't seem to exist anymore" ),
Index: trunk/phase3/includes/api/ApiUpload.php
@@ -428,6 +428,8 @@
429429 /**
430430 * Perform the actual upload. Returns a suitable result array on success;
431431 * dies on failure.
 432+ *
 433+ * @return array
432434 */
433435 protected function performUpload() {
434436 global $wgUser;
Index: trunk/phase3/includes/api/ApiFeedWatchlist.php
@@ -44,6 +44,8 @@
4545
4646 /**
4747 * This module uses a custom feed wrapper printer.
 48+ *
 49+ * @return ApiFormatFeedWrapper
4850 */
4951 public function getCustomPrinter() {
5052 return new ApiFormatFeedWrapper( $this->getMain() );
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php
@@ -275,6 +275,8 @@
276276
277277 /**
278278 * Extract fields from the database row and append them to a result array
 279+ *
 280+ * @return array
279281 */
280282 private function extractRowInfo( $row ) {
281283 $vals = array();

Comments

#Comment by Brion VIBBER (talk | contribs)   21:49, 21 September 2011

The things that return an ApiFormatFeedWrapper don't really need to expose that fact, it's an implementation detail. Per the interface on parent class this returns:

* @return mixed instance of a derived class of ApiFormatBase, or null

They should either keep that or allow it to filter down from the parent class (does doxygen do that for us already?)

#Comment by Brion VIBBER (talk | contribs)   21:50, 21 September 2011

and no, it doesn't look like doxygen copies return & param defs down from the parent class's definition. Silly!

Status & tagging log