[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix documentation mistakes as reported by Phan

2018-01-18 Thread jenkins-bot (Code Review)
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
 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix documentation mistakes as reported by Phan

2018-01-08 Thread Thiemo Kreuz (WMDE) (Code Review)
Thiemo Kreuz (WMDE) has uploaded a new change for review. ( 
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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/45/402845/1

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