Localisation updates for core and extension messages from translatewiki.net
[lhc/web/wiklou.git] / includes / Status.php
index 79179f5..e9f3fb9 100644 (file)
@@ -18,7 +18,7 @@ class Status {
 
        /** Counters for batch operations */
        public $successCount = 0, $failCount = 0;
-       /** Array to indicate which items of the batch operations failed */
+       /** Array to indicate which items of the batch operations were successful */
        public $success = array();
 
        /*semi-private*/ var $errors = array();
@@ -51,7 +51,7 @@ class Status {
        /**
         * Change operation result
         *
-        * @param $ok Boolean: whether to operation completed
+        * @param $ok Boolean: whether the operation completed
         * @param $value Mixed
         */
        function setResult( $ok, $value = null ) {
@@ -127,6 +127,10 @@ class Status {
                $this->cleanCallback = false;
        }
 
+       /**
+        * @param $params array
+        * @return array
+        */
        protected function cleanParams( $params ) {
                if ( !$this->cleanCallback ) {
                        return $params;
@@ -138,6 +142,10 @@ class Status {
                return $cleanParams;
        }
 
+       /**
+        * @param $item
+        * @return string
+        */
        protected function getItemXML( $item ) {
                $params = $this->cleanParams( $item['params'] );
                $xml = "<{$item['type']}>\n" .
@@ -152,6 +160,7 @@ class Status {
 
        /**
         * Get the error list as XML
+        * @return string
         */
        function getXML() {
                $xml = "<errors>\n";
@@ -285,11 +294,11 @@ class Status {
                }
                return $result;
        }
-       
+
        /**
         * Returns a list of status messages of the given type, with message and
         * params left untouched, like a sane version of getStatusArray
-        * 
+        *
         * @param $type String
         *
         * @return Array
@@ -299,7 +308,7 @@ class Status {
                foreach ( $this->errors as $error ) {
                        if ( $error['type'] === $type ) {
                                $result[] = $error;
-                       }               
+                       }
                }
                return $result;
        }
@@ -320,10 +329,12 @@ class Status {
        }
 
        /**
-        * If the specified source message exists, replace it with the specified 
+        * If the specified source message exists, replace it with the specified
         * destination message, but keep the same parameters as in the original error.
         *
         * Return true if the replacement was done, false otherwise.
+        *
+        * @return bool
         */
        function replaceMessage( $source, $dest ) {
                $replaced = false;