jenkins-bot has submitted this change and it was merged.

Change subject: Fix all incomplete PHPDoc tags in Client/Lib/Repo
......................................................................


Fix all incomplete PHPDoc tags in Client/Lib/Repo

As reported by PHPStorm's code analysis.

Change-Id: Ib1ed838c27026ea18181f77ba65bb56f8b581f41
---
M client/includes/Changes/AffectedPagesFinder.php
M client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
M client/includes/store/UsageUpdater.php
M client/tests/phpunit/includes/UsageUpdaterTest.php
M lib/tests/phpunit/store/MockTermIndex.php
M repo/includes/Diff/ClaimDifferenceVisualizer.php
M repo/includes/EditEntity.php
M repo/includes/LabelDescriptionDuplicateDetector.php
M repo/includes/Localizer/ChangeOpValidationExceptionLocalizer.php
M repo/includes/ParserOutputJsConfigBuilder.php
M repo/includes/View/EntityViewFactory.php
M repo/includes/View/PropertyView.php
M repo/includes/View/SiteLinksView.php
M repo/includes/WikibaseRepo.php
M repo/includes/api/LinkTitles.php
M repo/includes/content/ItemHandler.php
M repo/includes/store/sql/EntityPerPageTable.php
M repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
18 files changed, 49 insertions(+), 9 deletions(-)

Approvals:
  Adrian Lang: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/includes/Changes/AffectedPagesFinder.php 
b/client/includes/Changes/AffectedPagesFinder.php
index e7bd0a3..4f2765a 100644
--- a/client/includes/Changes/AffectedPagesFinder.php
+++ b/client/includes/Changes/AffectedPagesFinder.php
@@ -104,7 +104,7 @@
        /**
         * @since 0.5
         *
-        * @param EntityChange $change
+        * @param Change $change
         *
         * @return Iterator<PageEntityUsages>
         */
diff --git 
a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php 
b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
index 2632ff9..8e4b000 100644
--- 
a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
+++ 
b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
@@ -54,6 +54,7 @@
 
        /**
         * @param Language $language
+        * @param PropertyIdResolver $propertyIdResolver
         * @param SnaksFinder $snaksFinder
         * @param SnakFormatter $snakFormatter
         * @param UsageAccumulator $usageAcc
diff --git a/client/includes/store/UsageUpdater.php 
b/client/includes/store/UsageUpdater.php
index acf5a03..f750d31 100644
--- a/client/includes/store/UsageUpdater.php
+++ b/client/includes/store/UsageUpdater.php
@@ -61,7 +61,7 @@
         * any subscriptions based on that usage.
         *
         * @param int $pageId The ID of the page the entities are used on.
-        * @param array $usages A list of EntityUsage objects.
+        * @param EntityUsage[] $usages A list of EntityUsage objects.
         * See docs/usagetracking.wiki for details.
         *
         * @throws InvalidArgumentException
diff --git a/client/tests/phpunit/includes/UsageUpdaterTest.php 
b/client/tests/phpunit/includes/UsageUpdaterTest.php
index 317a6af..843e38e 100644
--- a/client/tests/phpunit/includes/UsageUpdaterTest.php
+++ b/client/tests/phpunit/includes/UsageUpdaterTest.php
@@ -7,6 +7,7 @@
 use Wikibase\Client\Usage\SubscriptionManager;
 use Wikibase\Client\Usage\UsageLookup;
 use Wikibase\Client\Usage\UsageTracker;
+use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\ItemId;
 
 /**
@@ -22,7 +23,7 @@
 class UsageUpdaterTest extends \PHPUnit_Framework_TestCase {
 
        /**
-        * @param array $oldUsage
+        * @param EntityUsage[]|null $oldUsage
         *
         * @return UsageTracker
         */
@@ -49,6 +50,8 @@
        }
 
        /**
+        * @param EntityId[]|null $unusedEntities
+        *
         * @return UsageLookup
         */
        private function getUsageLookup( array $unusedEntities = null ) {
@@ -67,6 +70,10 @@
        }
 
        /**
+        * @param string $wiki
+        * @param EntityId[] $subscribe
+        * @param EntityId[] $unsubscribe
+        *
         * @return SubscriptionManager
         */
        private function getSubscriptionManager( $wiki, $subscribe, 
$unsubscribe ) {
@@ -100,6 +107,11 @@
        }
 
        /**
+        * @param EntityUsage[] $oldUsage
+        * @param EntityId[]|null $unusedEntities
+        * @param EntityId[] $subscribe
+        * @param EntityId[] $unsubscribe
+        *
         * @return UsageUpdater
         */
        private function getUsageUpdater( $oldUsage, $unusedEntities, array 
$subscribe, array $unsubscribe ) {
@@ -158,6 +170,11 @@
 
        /**
         * @dataProvider updateUsageForPageProvider
+        * @param EntityUsage[] $oldUsage
+        * @param EntityUsage[] $newUsage
+        * @param EntityId[]|null $unusedEntities
+        * @param EntityId[] $subscribe
+        * @param EntityId[] $unsubscribe
         */
        public function testUpdateUsageForPage( $oldUsage, $newUsage, 
$unusedEntities, $subscribe, $unsubscribe ) {
                $updater = $this->getUsageUpdater( $oldUsage, $unusedEntities, 
$subscribe, $unsubscribe );
diff --git a/lib/tests/phpunit/store/MockTermIndex.php 
b/lib/tests/phpunit/store/MockTermIndex.php
index 39bf096..cae534f 100644
--- a/lib/tests/phpunit/store/MockTermIndex.php
+++ b/lib/tests/phpunit/store/MockTermIndex.php
@@ -132,6 +132,11 @@
        }
 
        /**
+        * @param string $label
+        * @param string|null $languageCode
+        * @param string|null $entityType
+        * @param bool $fuzzySearch
+        *
         * @return EntityId[]
         */
        public function getEntityIdsForLabel( $label, $languageCode = null, 
$entityType = null,
diff --git a/repo/includes/Diff/ClaimDifferenceVisualizer.php 
b/repo/includes/Diff/ClaimDifferenceVisualizer.php
index 8c19771..0e72692 100644
--- a/repo/includes/Diff/ClaimDifferenceVisualizer.php
+++ b/repo/includes/Diff/ClaimDifferenceVisualizer.php
@@ -257,7 +257,7 @@
        }
 
        /**
-        * @param EntityId
+        * @param EntityId $entityId
         *
         * @return string HTML
         */
diff --git a/repo/includes/EditEntity.php b/repo/includes/EditEntity.php
index 9fe1cd4..eb65d3f 100644
--- a/repo/includes/EditEntity.php
+++ b/repo/includes/EditEntity.php
@@ -796,7 +796,7 @@
        }
 
        /**
-        * EntityDocument $entity
+        * @param EntityDocument $entity
         *
         * @return IContextSource
         */
@@ -954,4 +954,5 @@
 
                $this->entityStore->updateWatchlist( $user, 
$this->getEntityId(), $watch );
        }
+
 }
diff --git a/repo/includes/LabelDescriptionDuplicateDetector.php 
b/repo/includes/LabelDescriptionDuplicateDetector.php
index c18678b..113bbfc 100644
--- a/repo/includes/LabelDescriptionDuplicateDetector.php
+++ b/repo/includes/LabelDescriptionDuplicateDetector.php
@@ -126,7 +126,7 @@
 
        /**
         * @param Term[] $terms
-        * @param EntityId $id
+        * @param EntityId $entityId
         *
         * @return Term[]
         */
@@ -138,4 +138,5 @@
                        }
                );
        }
+
 }
diff --git a/repo/includes/Localizer/ChangeOpValidationExceptionLocalizer.php 
b/repo/includes/Localizer/ChangeOpValidationExceptionLocalizer.php
index 7d1377a..c2198a4 100644
--- a/repo/includes/Localizer/ChangeOpValidationExceptionLocalizer.php
+++ b/repo/includes/Localizer/ChangeOpValidationExceptionLocalizer.php
@@ -35,6 +35,7 @@
         *
         * @param Exception $exception
         *
+        * @throws InvalidArgumentException
         * @return Message
         */
        public function getExceptionMessage( Exception $exception ) {
@@ -62,4 +63,5 @@
        public function hasExceptionMessage( Exception $exception ) {
                return $exception instanceof ChangeOpValidationException;
        }
+
 }
diff --git a/repo/includes/ParserOutputJsConfigBuilder.php 
b/repo/includes/ParserOutputJsConfigBuilder.php
index e4e230d..4450e13 100644
--- a/repo/includes/ParserOutputJsConfigBuilder.php
+++ b/repo/includes/ParserOutputJsConfigBuilder.php
@@ -93,7 +93,7 @@
         * able to pick which information is actually needed in which context. 
E.g. we are skipping the
         * actual revision ID here, and thereby avoiding any database access.
         *
-        * @param array $entities A list of entity records from 
EntityInfoBuilder::getEntityInfo
+        * @param array $entityInfoRecords A list of entity records from 
EntityInfoBuilder::getEntityInfo
         *
         * @return array A list of revision records
         */
diff --git a/repo/includes/View/EntityViewFactory.php 
b/repo/includes/View/EntityViewFactory.php
index b69fdbc..49b19c7 100644
--- a/repo/includes/View/EntityViewFactory.php
+++ b/repo/includes/View/EntityViewFactory.php
@@ -66,12 +66,11 @@
        private $specialSiteLinkGroups;
 
        /**
-        * @var array
+        * @var string[]
         */
        private $badgeItems;
 
        /**
-        *
         * @var TemplateFactory
         */
        private $templateFactory;
@@ -83,6 +82,9 @@
         * @param SiteStore $siteStore
         * @param DataTypeFactory $dataTypeFactory
         * @param TemplateFactory $templateFactory
+        * @param string[] $siteLinkGroups
+        * @param string[] $specialSiteLinkGroups
+        * @param string[] $badgeItems
         */
        public function __construct(
                EntityIdFormatterFactory $idFormatterFactory,
@@ -113,6 +115,8 @@
 
        /**
         * @param string $format
+        *
+        * @throws InvalidArgumentException
         */
        private function checkOutputFormat( $format ) {
                if ( $format !== SnakFormatter::FORMAT_HTML
diff --git a/repo/includes/View/PropertyView.php 
b/repo/includes/View/PropertyView.php
index 8bdf95c..fb78b62 100644
--- a/repo/includes/View/PropertyView.php
+++ b/repo/includes/View/PropertyView.php
@@ -36,6 +36,7 @@
         * @param TemplateFactory $templateFactory
         * @param FingerprintView $fingerprintView
         * @param StatementGroupListView $statementGroupListView
+        * @param DataTypeFactory $dataTypeFactory
         * @param Language $language
         * @param bool $editable
         */
diff --git a/repo/includes/View/SiteLinksView.php 
b/repo/includes/View/SiteLinksView.php
index e56e6bf..b0a4b98 100644
--- a/repo/includes/View/SiteLinksView.php
+++ b/repo/includes/View/SiteLinksView.php
@@ -61,6 +61,7 @@
        private $languageCode;
 
        /**
+        * @param TemplateFactory $templateFactory
         * @param SiteList $sites
         * @param SectionEditLinkGenerator $sectionEditLinkGenerator
         * @param EntityLookup $entityLookup
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 2932368..fbfbe04 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -534,6 +534,8 @@
        }
 
        /**
+        * @param TermLookup $termLookup
+        *
         * @return WikibaseValueFormatterBuilders
         */
        public function getValueFormatterBuildersForTermLookup( TermLookup 
$termLookup ) {
diff --git a/repo/includes/api/LinkTitles.php b/repo/includes/api/LinkTitles.php
index fcef462..8702efc 100644
--- a/repo/includes/api/LinkTitles.php
+++ b/repo/includes/api/LinkTitles.php
@@ -153,6 +153,8 @@
         * @param SiteList $sites
         * @param string $site
         * @param string $pageTitle
+        *
+        * @return array( Site $site, string $pageName )
         */
        private function getSiteAndNormalizedPageName( SiteList $sites, $site, 
$pageTitle ) {
                $siteObj = $sites->getSite( $site );
diff --git a/repo/includes/content/ItemHandler.php 
b/repo/includes/content/ItemHandler.php
index 6b47c0e..3854b18 100644
--- a/repo/includes/content/ItemHandler.php
+++ b/repo/includes/content/ItemHandler.php
@@ -38,6 +38,7 @@
         * @param EntityContentDataCodec $contentCodec
         * @param EntityConstraintProvider $constraintProvider
         * @param ValidatorErrorLocalizer $errorLocalizer
+        * @param EntityIdParser $entityIdParser
         * @param SiteLinkCache $siteLinkStore
         * @param callable|null $legacyExportFormatDetector
         */
diff --git a/repo/includes/store/sql/EntityPerPageTable.php 
b/repo/includes/store/sql/EntityPerPageTable.php
index d2df3a1..5b89628 100644
--- a/repo/includes/store/sql/EntityPerPageTable.php
+++ b/repo/includes/store/sql/EntityPerPageTable.php
@@ -35,6 +35,7 @@
        private $useRedirectTargetColumn;
 
        /**
+        * @param EntityIdParser $entityIdParser
         * @param bool $useRedirectTargetColumn
         *
         * @throws InvalidArgumentException
diff --git a/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php 
b/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
index a8abbd4..c5b4ce6 100644
--- a/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
+++ b/repo/tests/phpunit/includes/Notifications/ChangeNotifierTest.php
@@ -62,6 +62,7 @@
         * @param ItemId $id
         * @param ItemId $target
         *
+        * @throws RuntimeException
         * @return EntityContent
         */
        protected function makeItemRedirectContent( ItemId $id, ItemId $target 
) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1ed838c27026ea18181f77ba65bb56f8b581f41
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to