From: jenkins-bot Date: Sat, 5 Aug 2017 22:07:59 +0000 (+0000) Subject: Merge "Fix and make some types in PHPDoc and JSDoc tags more specific" X-Git-Tag: 1.31.0-rc.0~2455 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=fb79f30319b9ad2a7eb0f5f4d1668143ec8f963e;hp=4a57391c75f4da1d8232e9f3394c8c565285049e Merge "Fix and make some types in PHPDoc and JSDoc tags more specific" --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 034d24360f..500f4324df 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2860,7 +2860,7 @@ abstract class ApiBase extends ContextSource { * 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 ) { wfDeprecated( __METHOD__, '1.29' ); diff --git a/includes/libs/StatusValue.php b/includes/libs/StatusValue.php index e860ec491f..f9dcc1b52e 100644 --- a/includes/libs/StatusValue.php +++ b/includes/libs/StatusValue.php @@ -40,17 +40,22 @@ * @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; @@ -138,7 +143,7 @@ class StatusValue { * * Each error is a (message:string or MessageSpecifier,params:array) map * - * @return array + * @return array[] */ public function getErrors() { return $this->errors; @@ -230,7 +235,7 @@ class StatusValue { * - params: array list of parameters * * @param string $type - * @return array + * @return array[] */ public function getErrorsByType( $type ) { $result = []; diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index eeb8823ffb..8afea0b295 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -352,7 +352,7 @@ class SpecialSearch extends SpecialPage { $out->addHTML( $dymWidget->render( $term, $textMatches ) ); } - $hasErrors = $textStatus && $textStatus->getErrors(); + $hasErrors = $textStatus && $textStatus->getErrors() !== []; $hasOtherResults = $textMatches && $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS ); diff --git a/languages/Language.php b/languages/Language.php index 941f4b8fdc..92dad9b134 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1092,7 +1092,7 @@ class Language { * 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? *