jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402845 )

Change subject: Fix documentation mistakes as reported by Phan
......................................................................


Fix documentation mistakes as reported by Phan

This patch fixes a whole bunch of issues as reported by Phan. The patch
focuses exclusively on comments, and should be very easy to review because
of this.

Change-Id: I010f05743881b5f107745ea28327063c18db01b6
---
M client/WikibaseClient.hooks.php
M client/includes/Api/ApiListEntityUsage.php
M client/includes/Api/ApiPropsEntityUsage.php
M client/includes/RecentChanges/ExternalChangeFactory.php
M client/includes/Store/Sql/DirectSqlStore.php
M lib/includes/EntityTypeDefinitions.php
M lib/includes/Interactors/TermIndexSearchInteractor.php
M lib/includes/RepositoryDefinitions.php
M repo/includes/Content/PropertyHandler.php
M repo/includes/Dumpers/JsonDumpGenerator.php
M repo/includes/Specials/SpecialAvailableBadges.php
M repo/includes/Specials/SpecialSetLabelDescriptionAliases.php
12 files changed, 40 insertions(+), 14 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  Lucas Werkmeister (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index b53ef3c..4886dbd 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -312,6 +312,9 @@
                }
        }
 
+       /**
+        * @param array[] &$queryPages
+        */
        public static function onwgQueryPages( &$queryPages ) {
                $queryPages[] = [ SpecialUnconnectedPages::class, 
'UnconnectedPages' ];
                $queryPages[] = [ SpecialPagesWithBadges::class, 
'PagesWithBadges' ];
diff --git a/client/includes/Api/ApiListEntityUsage.php 
b/client/includes/Api/ApiListEntityUsage.php
index fbc44b4..c80a398 100644
--- a/client/includes/Api/ApiListEntityUsage.php
+++ b/client/includes/Api/ApiListEntityUsage.php
@@ -36,6 +36,11 @@
                $this->repoLinker = $repoLinker;
        }
 
+       /**
+        * @see ApiQueryGeneratorBase::executeGenerator
+        *
+        * @param ApiPageSet $resultPageSet
+        */
        public function executeGenerator( $resultPageSet ) {
                $this->run( $resultPageSet );
        }
@@ -168,6 +173,13 @@
                );
        }
 
+       /**
+        * @see ApiQueryBase::getCacheMode
+        *
+        * @param array $params
+        *
+        * @return string
+        */
        public function getCacheMode( $params ) {
                return 'public';
        }
diff --git a/client/includes/Api/ApiPropsEntityUsage.php 
b/client/includes/Api/ApiPropsEntityUsage.php
index 41d022b..092eab6 100644
--- a/client/includes/Api/ApiPropsEntityUsage.php
+++ b/client/includes/Api/ApiPropsEntityUsage.php
@@ -105,6 +105,13 @@
                );
        }
 
+       /**
+        * @see ApiQueryBase::getCacheMode
+        *
+        * @param array $params
+        *
+        * @return string
+        */
        public function getCacheMode( $params ) {
                return 'public';
        }
diff --git a/client/includes/RecentChanges/ExternalChangeFactory.php 
b/client/includes/RecentChanges/ExternalChangeFactory.php
index 6f01fb1..c02fe57 100644
--- a/client/includes/RecentChanges/ExternalChangeFactory.php
+++ b/client/includes/RecentChanges/ExternalChangeFactory.php
@@ -196,7 +196,7 @@
         * @param array|string $comment
         * @param string $type
         *
-        * @return string
+        * @return array
         */
        private function parseAutoComment( $comment, $type ) {
                $newComment = [
diff --git a/client/includes/Store/Sql/DirectSqlStore.php 
b/client/includes/Store/Sql/DirectSqlStore.php
index e5d0404..6c0fc7b 100644
--- a/client/includes/Store/Sql/DirectSqlStore.php
+++ b/client/includes/Store/Sql/DirectSqlStore.php
@@ -100,7 +100,7 @@
        private $cacheDuration;
 
        /**
-        * @var EntityLookup|null
+        * @var EntityRevisionLookup|null
         */
        private $entityRevisionLookup = null;
 
diff --git a/lib/includes/EntityTypeDefinitions.php 
b/lib/includes/EntityTypeDefinitions.php
index a5b1d6c..7c54a21 100644
--- a/lib/includes/EntityTypeDefinitions.php
+++ b/lib/includes/EntityTypeDefinitions.php
@@ -52,7 +52,7 @@
        /**
         * @param string $field
         *
-        * @return callable[]
+        * @return array
         */
        private function getMapForDefinitionField( $field ) {
                $fieldValues = [];
diff --git a/lib/includes/Interactors/TermIndexSearchInteractor.php 
b/lib/includes/Interactors/TermIndexSearchInteractor.php
index c981d82..9c750a0 100644
--- a/lib/includes/Interactors/TermIndexSearchInteractor.php
+++ b/lib/includes/Interactors/TermIndexSearchInteractor.php
@@ -220,8 +220,7 @@
        /**
         * @param TermIndexEntry[] $termIndexEntries
         *
-        * @return array[]
-        * @see TermSearchInteractor interface for return format
+        * @return TermSearchResult[]
         */
        private function getSearchResults( array $termIndexEntries ) {
                $searchResults = [];
diff --git a/lib/includes/RepositoryDefinitions.php 
b/lib/includes/RepositoryDefinitions.php
index 03047ca..bed0ff3 100644
--- a/lib/includes/RepositoryDefinitions.php
+++ b/lib/includes/RepositoryDefinitions.php
@@ -31,17 +31,17 @@
 class RepositoryDefinitions {
 
        /**
-        * @var array
+        * @var array[]
         */
        private $repositoryDefinitions = [];
 
        /**
-        * @var array
+        * @var array[]
         */
        private $entityTypeToRepositoryMapping = [];
 
        /**
-        * @var array
+        * @var array[]
         */
        private $entityTypesPerRepository = [];
 
@@ -51,7 +51,7 @@
        private $entityNamespaces;
 
        /**
-        * @param array $repositoryDefinitions Associative array mapping 
repository names to an array of
+        * @param array[] $repositoryDefinitions Associative array mapping 
repository names to an array of
         * repository settings. Empty-string key stands for local repository.
         * See class description for information on the expected format of 
$repositoryDefinitions
         *
@@ -117,7 +117,7 @@
        }
 
        /**
-        * @return string[] Associative array (string => array) mapping entity 
types to a list of
+        * @return array[] Associative array (string => array) mapping entity 
types to a list of
         * [string repository name, int namespace] pairs, for repositories that 
provide entities of the given type,
         * and the namespace ID on the respective repository.
         */
@@ -151,7 +151,7 @@
        }
 
        /**
-        * @param array $repositoryDefinitions
+        * @param array[] $repositoryDefinitions
         *
         * @throws InvalidArgumentException
         */
diff --git a/repo/includes/Content/PropertyHandler.php 
b/repo/includes/Content/PropertyHandler.php
index 8b09ef1..1e97ec4 100644
--- a/repo/includes/Content/PropertyHandler.php
+++ b/repo/includes/Content/PropertyHandler.php
@@ -200,7 +200,7 @@
        /**
         * @see EntityHandler::makeEmptyEntity()
         *
-        * @return EntityContent
+        * @return Property
         */
        public function makeEmptyEntity() {
                return Property::newFromType( '' );
diff --git a/repo/includes/Dumpers/JsonDumpGenerator.php 
b/repo/includes/Dumpers/JsonDumpGenerator.php
index ad80bc0..3d5f649 100644
--- a/repo/includes/Dumpers/JsonDumpGenerator.php
+++ b/repo/includes/Dumpers/JsonDumpGenerator.php
@@ -200,7 +200,7 @@
        /**
         * Encodes the given data as JSON
         *
-        * @param string $data
+        * @param mixed $data
         *
         * @return string
         * @throws MWException
diff --git a/repo/includes/Specials/SpecialAvailableBadges.php 
b/repo/includes/Specials/SpecialAvailableBadges.php
index 28a5b8f..4e98638 100644
--- a/repo/includes/Specials/SpecialAvailableBadges.php
+++ b/repo/includes/Specials/SpecialAvailableBadges.php
@@ -48,6 +48,11 @@
                $this->badgeItems = $badgeItems;
        }
 
+       /**
+        * @see SpecialPage::execute
+        *
+        * @param string|null $subPage
+        */
        public function execute( $subPage ) {
                parent::execute( $subPage );
 
diff --git a/repo/includes/Specials/SpecialSetLabelDescriptionAliases.php 
b/repo/includes/Specials/SpecialSetLabelDescriptionAliases.php
index 50f4626..1821926 100644
--- a/repo/includes/Specials/SpecialSetLabelDescriptionAliases.php
+++ b/repo/includes/Specials/SpecialSetLabelDescriptionAliases.php
@@ -203,7 +203,7 @@
         * @param string $termType Either 'label', 'description' or 'aliases'.
         * @param string $value Text to fill the input element with
         *
-        * @return string HTML
+        * @return array[]
         */
        private function getLabeledInputField( $termType, $value ) {
                $fieldId = 'wikibase-setlabeldescriptionaliases-' . $termType;

-- 
To view, visit https://gerrit.wikimedia.org/r/402845
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I010f05743881b5f107745ea28327063c18db01b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Kreuz (WMDE) <thiemo.kr...@wikimedia.de>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Lucas Werkmeister (WMDE) <lucas.werkmeis...@wikimedia.de>
Gerrit-Reviewer: Thiemo Kreuz (WMDE) <thiemo.kr...@wikimedia.de>
Gerrit-Reviewer: WMDE-leszek <leszek.mani...@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