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 @@
         *      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?
         *

-- 
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) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Hoo man <h...@online.de>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to