[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix and make some types in PHPDoc and JSDoc tags more specific
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/366823 ) Change subject: Fix and make some types in PHPDoc and JSDoc tags more specific .. Fix and make some types in PHPDoc and JSDoc tags more specific Change-Id: I7c109067579f570ecccaabc75b0b4db7eac4e6c2 --- M includes/api/ApiBase.php M includes/libs/StatusValue.php M includes/specials/SpecialSearch.php M languages/Language.php 4 files changed, 12 insertions(+), 7 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index bc3def8..44a2280 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2857,7 +2857,7 @@ * 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 diff --git a/includes/libs/StatusValue.php b/includes/libs/StatusValue.php index e860ec4..f9dcc1b 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 @@ * * 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 @@ * - 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 eeb8823..8afea0b 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -352,7 +352,7 @@ $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 83dff65..f319d38 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1092,7 +1092,7 @@ * MMDDHHMMSS * 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? * -- To view, visit https://gerrit.wikimedia.org/r/366823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c109067579f570ecccaabc75b0b4db7eac4e6c2 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) Gerrit-Reviewer: Addshore Gerrit-Reviewer: Anomie Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix and make some types in PHPDoc and JSDoc tags more specific
Thiemo Mättig (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/366823 ) Change subject: Fix and make some types in PHPDoc and JSDoc tags more specific .. Fix and make some types in PHPDoc and JSDoc tags more specific Change-Id: I7c109067579f570ecccaabc75b0b4db7eac4e6c2 --- M includes/api/ApiBase.php M includes/libs/StatusValue.php M languages/Language.php M resources/lib/jquery.ui/jquery.ui.datepicker.js 4 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/23/366823/1 diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index bc3def8..44a2280 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2857,7 +2857,7 @@ * 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 diff --git a/includes/libs/StatusValue.php b/includes/libs/StatusValue.php index e860ec4..8fe783a 100644 --- a/includes/libs/StatusValue.php +++ b/includes/libs/StatusValue.php @@ -42,7 +42,10 @@ class StatusValue { /** @var bool */ protected $ok = true; - /** @var array */ + + /** +* @var array[] +*/ protected $errors = []; /** @var mixed */ @@ -138,7 +141,7 @@ * * Each error is a (message:string or MessageSpecifier,params:array) map * -* @return array +* @return array[] */ public function getErrors() { return $this->errors; @@ -230,7 +233,7 @@ * - params: array list of parameters * * @param string $type -* @return array +* @return array[] */ public function getErrorsByType( $type ) { $result = []; diff --git a/languages/Language.php b/languages/Language.php index 83dff65..f319d38 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1092,7 +1092,7 @@ * MMDDHHMMSS * 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? * diff --git a/resources/lib/jquery.ui/jquery.ui.datepicker.js b/resources/lib/jquery.ui/jquery.ui.datepicker.js index cd5d490..b0ba6b3 100644 --- a/resources/lib/jquery.ui/jquery.ui.datepicker.js +++ b/resources/lib/jquery.ui/jquery.ui.datepicker.js @@ -951,7 +951,8 @@ /* Set as beforeShowDay function to prevent selection of weekends. @param date Date - the date to customise - @return [boolean, string] - is this date selectable?, what is its CSS class? */ + @return {array} [boolean, string] - is this date selectable?, what is its CSS class? +*/ noWeekends: function(date) { var day = date.getDay(); return [(day > 0 && day < 6), '']; -- To view, visit https://gerrit.wikimedia.org/r/366823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c109067579f570ecccaabc75b0b4db7eac4e6c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits