r81206 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81205‎ | r81206 | r81207 >
Date:08:16, 30 January 2011
Author:reedy
Status:ok
Tags:
Comment:
A few return type hints
Modified paths:
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -180,6 +180,7 @@
181181
182182 /**
183183 * Return true if the API was started by other PHP code using FauxRequest
 184+ * @return bool
184185 */
185186 public function isInternalMode() {
186187 return $this->mInternalMode;
@@ -204,6 +205,8 @@
205206
206207 /**
207208 * Get the API module object. Only works after executeAction()
 209+ *
 210+ * @return ApiBase
208211 */
209212 public function getModule() {
210213 return $this->mModule;
@@ -309,6 +312,8 @@
310313
311314 /**
312315 * Create an instance of an output formatter by its name
 316+ *
 317+ * @return ApiFormatBase
313318 */
314319 public function createPrinterByName( $format ) {
315320 if ( !isset( $this->mFormats[$format] ) ) {
@@ -455,6 +460,7 @@
456461 * Replace the result data with the information about an exception.
457462 * Returns the error code
458463 * @param $e Exception
 464+ * @return string
459465 */
460466 protected function substituteResultWithError( $e ) {
461467 // Printer may not be initialized if the extractRequestParams() fails for the main module
@@ -516,6 +522,7 @@
517523
518524 /**
519525 * Set up for the execution.
 526+ * @return array
520527 */
521528 protected function setupExecuteAction() {
522529 // First add the id to the top element
@@ -692,6 +699,9 @@
693700 $printer->profileOut();
694701 }
695702
 703+ /**
 704+ * @return bool
 705+ */
696706 public function isReadMode() {
697707 return false;
698708 }
@@ -977,6 +987,7 @@
978988
979989 /**
980990 * Get the array mapping module names to class names
 991+ * @return array
981992 */
982993 function getModules() {
983994 return $this->mModules;

Status & tagging log