Minor parameter documentation improvements on External Store classes
authorReedy <reedy@wikimedia.org>
Thu, 4 Oct 2012 00:08:10 +0000 (01:08 +0100)
committerReedy <reedy@wikimedia.org>
Thu, 4 Oct 2012 00:08:10 +0000 (01:08 +0100)
Changed the comment about returning ExternalStore subclasses, as neither ExternalStoreDB or ExternalStoreHttp subclass ExternalStore

Remove trailing whitespace

Change-Id: I90b61f93a99d5088edfadf83c846ec5fa7e40c2e

includes/ExternalStore.php
includes/ExternalStoreDB.php

index 391829a..26e456c 100644 (file)
  */
 class ExternalStore {
        var $mParams;
-       
+
+       /**
+        * @param $params array
+        */
        function __construct( $params = array() ) {
                $this->mParams = $params;
        }
-       
+
        /**
         * Fetch data from given URL
         *
@@ -79,7 +82,7 @@ class ExternalStore {
         *
         * @param $proto String: type of external storage, should be a value in $wgExternalStores
         * @param $params Array: associative array of parameters for the ExternalStore object.
-        * @return ExternalStore subclass or false on error
+        * @return ExternalStore|bool ExternalStore class or false on error
         */
        static function getStoreObject( $proto, $params = array() ) {
                global $wgExternalStores;
@@ -119,7 +122,7 @@ class ExternalStore {
                        return $store->store( $params, $data );
                }
        }
-       
+
        /**
         * Like insert() above, but does more of the work for us.
         * This function does not need a url param, it builds it by
@@ -127,6 +130,7 @@ class ExternalStore {
         *
         * @param $data String
         * @param $storageParams Array: associative array of parameters for the ExternalStore object.
+        * @throws DBConnectionError|DBQueryError|MWException
         * @return string The URL of the stored data item, or false on error
         */
        public static function insertToDefault( $data, $storageParams = array() ) {
@@ -165,7 +169,7 @@ class ExternalStore {
                        throw new MWException( "Unable to store text to external storage" );
                }
        }
-       
+
        /**
         * @param $data
         * @param $wiki
index 6f2b33e..4f35394 100644 (file)
@@ -26,6 +26,9 @@
  */
 class ExternalStoreDB {
 
+       /**
+        * @param $params array
+        */
        function __construct( $params = array() ) {
                $this->mParams = $params;
        }
@@ -165,6 +168,7 @@ class ExternalStoreDB {
         *
         * @param $cluster String: the cluster name
         * @param $data String: the data item
+        * @throws MWException
         * @return string URL
         */
        function store( $cluster, $data ) {