/** @var bool */
public $ok = true;
- /** @var mixed */
+ /** @var mixed */
public $value;
/** Counters for batch operations */
public $failCount = 0;
/** Array to indicate which items of the batch operations were successful */
- /** @var array */
+ /** @var array */
public $success = array();
/** @var array */
/**
* Change operation result
*
- * @param $ok Boolean: whether the operation completed
- * @param $value Mixed
+ * @param bool $ok Whether the operation completed
+ * @param mixed $value
*/
public function setResult( $ok, $value = null ) {
$this->ok = $ok;
/**
* Get the error list as a Message object
*
- * @param string $shortContext a short enclosing context message name, to
- * be used when there is a single error
- * @param string $longContext a long enclosing context message name, for a list
+ * @param string|string[] $shortContext A short enclosing context message name (or an array of
+ * message names), to be used when there is a single error.
+ * @param string|string[] $longContext A long enclosing context message name (or an array of
+ * message names), for a list.
+ *
* @return Message
*/
public function getMessage( $shortContext = false, $longContext = false ) {
$msgCount++;
}
- $wrapper = new RawMessage( '* $' . implode( "\n* \$", range( 1, $msgCount ) ) );
- $s = $wrapper->params( $msgs )->parse();
+ $s = new RawMessage( '* $' . implode( "\n* \$", range( 1, $msgCount ) ) );
+ $s->params( $msgs )->parse();
if ( $longContext ) {
- $s = wfMessage( $longContext, $wrapper );
+ $s = wfMessage( $longContext, $s );
} elseif ( $shortContext ) {
- $wrapper = new RawMessage( "\n\$1\n", $wrapper );
+ $wrapper = new RawMessage( "\n\$1\n", $s );
$wrapper->parse();
$s = wfMessage( $shortContext, $wrapper );
}
/**
* Merge another status object into this one
*
- * @param $other Status Other Status object
- * @param $overwriteValue Boolean: whether to override the "value" member
+ * @param Status $other Other Status object
+ * @param bool $overwriteValue Whether to override the "value" member
*/
public function merge( $other, $overwriteValue = false ) {
$this->errors = array_merge( $this->errors, $other->errors );
* Note, due to the lack of tools for comparing Message objects, this
* function will not work when using a Message object as the search parameter.
*
- * @param $source Message|String: Message key or object to search for
- * @param $dest Message|String: Replacement message key or object
+ * @param Message|string $source Message key or object to search for
+ * @param Message|string $dest Replacement message key or object
* @return bool Return true if the replacement was done, false otherwise.
*/
public function replaceMessage( $source, $dest ) {