* Return the error message related to a certain array
* @deprecated since 1.29
* @param array|string|MessageSpecifier $error Element of a getUserPermissionsErrors()-style array
- * @return [ 'code' => code, 'info' => info ]
+ * @return array [ 'code' => code, 'info' => info ]
*/
public function parseMsg( $error ) {
// Check whether someone passed the whole array, instead of one element as
* @since 1.25
*/
class StatusValue {
+
/** @var bool */
protected $ok = true;
- /** @var array */
+
+ /** @var array[] */
protected $errors = [];
/** @var mixed */
public $value;
- /** @var array Map of (key => bool) to indicate success of each part of batch operations */
+
+ /** @var bool[] Map of (key => bool) to indicate success of each part of batch operations */
public $success = [];
+
/** @var int Counter for batch operations */
public $successCount = 0;
+
/** @var int Counter for batch operations */
public $failCount = 0;
*
* Each error is a (message:string or MessageSpecifier,params:array) map
*
- * @return array
+ * @return array[]
*/
public function getErrors() {
return $this->errors;
* - params: array list of parameters
*
* @param string $type
- * @return array
+ * @return array[]
*/
public function getErrorsByType( $type ) {
$result = [];
$out->addHTML( $dymWidget->render( $term, $textMatches ) );
}
- $hasErrors = $textStatus && $textStatus->getErrors();
+ $hasErrors = $textStatus && $textStatus->getErrors() !== [];
$hasOtherResults = $textMatches &&
$textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS );
* YYYYMMDDHHMMSS
* 01234567890123
* @param DateTimeZone $zone Timezone of $ts
- * @param[out] int $ttl The amount of time (in seconds) the output may be cached for.
+ * @param int &$ttl The amount of time (in seconds) the output may be cached for.
* Only makes sense if $ts is the current time.
* @todo handling of "o" format character for Iranian, Hebrew, Hijri & Thai?
*