Comment return types, some explicit class variable declaration
authorSam Reed <reedy@users.mediawiki.org>
Sat, 9 Oct 2010 00:01:45 +0000 (00:01 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 9 Oct 2010 00:01:45 +0000 (00:01 +0000)
includes/RecentChange.php
includes/api/ApiDelete.php
includes/api/ApiMain.php
includes/api/ApiQueryInfo.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryRecentChanges.php

index 333ff02..bf8379c 100644 (file)
@@ -256,7 +256,7 @@ class RecentChange {
         *
         * @param $change Mixed: RecentChange or corresponding rc_id
         * @param $auto Boolean: for automatic patrol
-        * @return See doMarkPatrolled(), or null if $change is not an existing rc_id
+        * @return Array See doMarkPatrolled(), or null if $change is not an existing rc_id
         */
        public static function markPatrolled( $change, $auto = false ) {
                $change = $change instanceof RecentChange
index 93baa4e..714b358 100644 (file)
@@ -158,6 +158,15 @@ class ApiDelete extends ApiBase {
                return array( array( 'cannotdelete', $article->mTitle->getPrefixedText() ) );
        }
 
+       /**
+        * @static
+        * @param $token
+        * @param $title
+        * @param $oldimage
+        * @param $reason
+        * @param $suppress bool
+        * @return \type|array|Title
+        */
        public static function deleteFile( $token, &$title, $oldimage, &$reason = null, $suppress = false ) {
                $errors = self::getPermissionsError( $title, $token );
                if ( count( $errors ) ) {
index df830ea..19ad59a 100644 (file)
@@ -448,7 +448,7 @@ class ApiMain extends ApiBase {
        /**
         * Replace the result data with the information about an exception.
         * Returns the error code
-        * @param $e MWException
+        * @param $e Exception
         */
        protected function substituteResultWithError( $e ) {
                // Printer may not be initialized if the extractRequestParams() fails for the main module
index d6d0049..fbef4cf 100644 (file)
@@ -41,6 +41,8 @@ class ApiQueryInfo extends ApiQueryBase {
                $fld_readable = false, $fld_watched = false,
                $fld_preload = false, $fld_displaytitle = false;
 
+       private $tokenFunctions;
+
        public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'in' );
        }
index ba20114..ee6f1eb 100644 (file)
@@ -180,6 +180,15 @@ class ApiQueryLogEvents extends ApiQueryBase {
                $this->getResult()->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'item' );
        }
 
+       /**
+        * @static
+        * @param $result ApiResult
+        * @param $vals
+        * @param $params
+        * @param $type
+        * @param $ts
+        * @return array
+        */
        public static function addLogParams( $result, &$vals, $params, $type, $ts ) {
                $params = explode( "\n", $params );
                switch ( $type ) {
index fe53b1a..0281a04 100644 (file)
@@ -44,6 +44,9 @@ class ApiQueryRecentChanges extends ApiQueryBase {
        private $fld_comment = false, $fld_parsedcomment = false, $fld_user = false, $fld_userid = false,
                        $fld_flags = false, $fld_timestamp = false, $fld_title = false, $fld_ids = false,
                        $fld_sizes = false, $fld_redirect = false, $fld_patrolled = false, $fld_loginfo = false, $fld_tags = false;
+
+       private $tokenFunctions;
+
        /**
         * Get an array mapping token names to their handler functions.
         * The prototype for a token function is func($pageid, $title, $rc)