r107023 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107022‎ | r107023 | r107024 >
Date:00:51, 22 December 2011
Author:bawolff
Status:ok
Tags:
Comment:
Update documentation on params method of Message class to indicate it can either be varags, or it can also
take an array of all the parameters as the first argument.
Modified paths:
  • /trunk/phase3/includes/Message.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Message.php
@@ -136,7 +136,7 @@
137137 * Factory function accepting multiple message keys and returning a message instance
138138 * for the first message which is non-empty. If all messages are empty then an
139139 * instance of the first message key is returned.
140 - * @param Varargs: message keys
 140+ * @param Varargs: message keys (or first arg as an array of all the message keys)
141141 * @return Message: $this
142142 */
143143 public static function newFallbackSequence( /*...*/ ) {
@@ -155,7 +155,7 @@
156156
157157 /**
158158 * Adds parameters to the parameter list of this message.
159 - * @param Varargs: parameters as Strings
 159+ * @param Varargs: parameters as Strings, or a single argument that is an array of Strings
160160 * @return Message: $this
161161 */
162162 public function params( /*...*/ ) {
@@ -173,7 +173,7 @@
174174 * In other words the parsing process cannot access the contents
175175 * of this type of parameter, and you need to make sure it is
176176 * sanitized beforehand. The parser will see "$n", instead.
177 - * @param Varargs: raw parameters as Strings
 177+ * @param Varargs: raw parameters as Strings (or single argument that is an array of raw parameters)
178178 * @return Message: $this
179179 */
180180 public function rawParams( /*...*/ ) {
@@ -190,7 +190,7 @@
191191 /**
192192 * Add parameters that are numeric and will be passed through
193193 * Language::formatNum before substitution
194 - * @param Varargs: numeric parameters
 194+ * @param Varargs: numeric parameters (or single argument that is array of numeric parameters)
195195 * @return Message: $this
196196 */
197197 public function numParams( /*...*/ ) {

Status & tagging log