Thiemo Mättig (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/263058

Change subject: Document nullable parameters as such via @param ...|null
......................................................................

Document nullable parameters as such via @param ...|null

I'm also removing the |null in two or three cases where it was wrong.

Change-Id: I3980012501b15d5e12510f0b0e60606ff9830b4c
---
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/Hooks/DataUpdateHookHandlers.php
M client/includes/Hooks/SidebarHookHandlers.php
M client/includes/Hooks/UpdateRepoHookHandlers.php
M client/includes/recentchanges/ChangeLineFormatter.php
M client/includes/specials/SpecialUnconnectedPages.php
M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
M lib/includes/PropertyInfoDataTypeLookup.php
M lib/includes/SnakFactory.php
M lib/includes/TypedValueFormatter.php
M lib/includes/formatters/DispatchingValueFormatter.php
M lib/includes/formatters/PropertyValueSnakFormatter.php
M lib/includes/serialization/CallbackFactory.php
M lib/includes/sites/SitesBuilder.php
M lib/tests/phpunit/Interactors/TermIndexSearchInteractorTest.php
M lib/tests/phpunit/formatters/EntityIdHtmlLinkFormatterTest.php
M lib/tests/phpunit/includes/modules/SitesModuleWorkerTest.php
M lib/tests/phpunit/store/MockTermIndex.php
M lib/tests/phpunit/store/RevisionBasedEntityLookupTest.php
M purtle/src/RdfWriter.php
M purtle/src/RdfWriterBase.php
M repo/Wikibase.hooks.php
M repo/includes/ChangeOp/ChangeOpLabel.php
M repo/includes/ChangeOp/ChangeOpQualifier.php
M repo/includes/ChangeOp/ChangeOpQualifierRemove.php
M repo/includes/ChangeOp/ChangeOpReference.php
M repo/includes/ChangeOp/ChangeOpReferenceRemove.php
M repo/includes/EditEntity.php
M repo/includes/api/ModifyEntity.php
M repo/includes/api/StatementModificationHelper.php
M repo/includes/content/ItemContent.php
M repo/includes/content/PropertyContent.php
M repo/includes/specials/SpecialItemDisambiguation.php
M repo/includes/specials/SpecialModifyEntity.php
M repo/includes/specials/SpecialModifyTerm.php
M repo/includes/specials/SpecialSetLabelDescriptionAliases.php
M repo/includes/specials/SpecialSetSiteLink.php
M repo/includes/store/EntityPerPage.php
M repo/includes/store/sql/ChangesSubscriptionTableBuilder.php
M repo/includes/store/sql/EntityPerPageTable.php
M repo/maintenance/dumpEntities.php
M repo/tests/phpunit/MockEntityPerPage.php
M repo/tests/phpunit/includes/ChangeDispatcherTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
M repo/tests/phpunit/includes/EditEntityTest.php
M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
M repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
M repo/tests/phpunit/includes/actions/ActionTestCase.php
M repo/tests/phpunit/includes/api/ApiModuleTestHelper.php
M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
M repo/tests/phpunit/includes/api/CreateRedirectTest.php
M repo/tests/phpunit/includes/api/EntityTestHelper.php
M repo/tests/phpunit/includes/api/SetClaimTest.php
M repo/tests/phpunit/includes/content/EntityContentTest.php
M repo/tests/phpunit/includes/content/EntityHandlerTest.php
M repo/tests/phpunit/includes/content/ItemContentTest.php
M repo/tests/phpunit/includes/content/ItemHandlerTest.php
M repo/tests/phpunit/includes/content/PropertyContentTest.php
M repo/tests/phpunit/includes/content/PropertyHandlerTest.php
M repo/tests/phpunit/includes/rdf/FullStatementsRdfBuilderTest.php
M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
M view/src/EntityTermsView.php
M view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
63 files changed, 80 insertions(+), 80 deletions(-)


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

diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index 47e90d1..c1e6eb1 100644
--- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -308,7 +308,7 @@
         *
         * @since 0.5
         *
-        * @param string $pageTitle
+        * @param string|null $pageTitle
         *
         * @return array
         */
diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php 
b/client/includes/Hooks/DataUpdateHookHandlers.php
index 7f3b681..8ac3f83 100644
--- a/client/includes/Hooks/DataUpdateHookHandlers.php
+++ b/client/includes/Hooks/DataUpdateHookHandlers.php
@@ -70,7 +70,7 @@
         * @param User &$user
         * @param string $reason
         * @param int $id id of the article that was deleted
-        * @param Content $content
+        * @param Content|null $content
         * @param LogEntry $logEntry
         */
        public static function onArticleDeleteComplete(
diff --git a/client/includes/Hooks/SidebarHookHandlers.php 
b/client/includes/Hooks/SidebarHookHandlers.php
index 9d22a68..a4746e9 100644
--- a/client/includes/Hooks/SidebarHookHandlers.php
+++ b/client/includes/Hooks/SidebarHookHandlers.php
@@ -101,7 +101,7 @@
         * @param array &$languageLink
         * @param Title $languageLinkTitle
         * @param Title $title
-        * @param OutputPage $output
+        * @param OutputPage|null $output
         *
         * @return bool
         */
diff --git a/client/includes/Hooks/UpdateRepoHookHandlers.php 
b/client/includes/Hooks/UpdateRepoHookHandlers.php
index 3876d57..e5e771a 100644
--- a/client/includes/Hooks/UpdateRepoHookHandlers.php
+++ b/client/includes/Hooks/UpdateRepoHookHandlers.php
@@ -129,7 +129,7 @@
         * @param User &$user
         * @param string $reason
         * @param int $id id of the article that was deleted
-        * @param Content $content
+        * @param Content|null $content
         * @param LogEntry $logEntry
         */
        public static function onArticleDeleteComplete(
diff --git a/client/includes/recentchanges/ChangeLineFormatter.php 
b/client/includes/recentchanges/ChangeLineFormatter.php
index bb85f4a..c43e6ef 100644
--- a/client/includes/recentchanges/ChangeLineFormatter.php
+++ b/client/includes/recentchanges/ChangeLineFormatter.php
@@ -285,7 +285,7 @@
 
        /**
         * @param string $userName
-        * @param string $text
+        * @param string|null $text
         *
         * @return string HTML
         */
diff --git a/client/includes/specials/SpecialUnconnectedPages.php 
b/client/includes/specials/SpecialUnconnectedPages.php
index 9edd729..b5ff969 100644
--- a/client/includes/specials/SpecialUnconnectedPages.php
+++ b/client/includes/specials/SpecialUnconnectedPages.php
@@ -95,8 +95,8 @@
         * @since 0.4
         *
         * @param DatabaseBase $dbr
-        * @param Title $title
-        * @param NamespaceChecker $checker
+        * @param Title|null $title
+        * @param NamespaceChecker|null $checker
         *
         * @return string[]
         */
diff --git a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
index 039f8f2..f54c6d6 100644
--- a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
@@ -27,7 +27,7 @@
 
        /**
         * @param Title $title
-        * @param array $expectedUsages
+        * @param EntityUsage[]|null $expectedUsages
         * @param string|null $touched
         * @param bool $prune whether pruneUsagesForPage() should be used
         * @param bool $add whether addUsagesForPage() should be used
diff --git a/lib/includes/PropertyInfoDataTypeLookup.php 
b/lib/includes/PropertyInfoDataTypeLookup.php
index 6845906..ca5560d 100644
--- a/lib/includes/PropertyInfoDataTypeLookup.php
+++ b/lib/includes/PropertyInfoDataTypeLookup.php
@@ -30,7 +30,7 @@
 
        /**
         * @param PropertyInfoStore $infoStore
-        * @param PropertyDataTypeLookup $fallbackLookup
+        * @param PropertyDataTypeLookup|null $fallbackLookup
         */
        public function __construct( PropertyInfoStore $infoStore, 
PropertyDataTypeLookup $fallbackLookup = null ) {
                $this->infoStore = $infoStore;
diff --git a/lib/includes/SnakFactory.php b/lib/includes/SnakFactory.php
index 5e054fa..c6ccbb7 100644
--- a/lib/includes/SnakFactory.php
+++ b/lib/includes/SnakFactory.php
@@ -29,7 +29,7 @@
         *
         * @param PropertyId $propertyId
         * @param string $snakType
-        * @param DataValue $value
+        * @param DataValue|null $value
         *
         * @return Snak
         * @throws InvalidArgumentException
diff --git a/lib/includes/TypedValueFormatter.php 
b/lib/includes/TypedValueFormatter.php
index eb55ff8..7d3f9bf 100644
--- a/lib/includes/TypedValueFormatter.php
+++ b/lib/includes/TypedValueFormatter.php
@@ -24,7 +24,7 @@
         * @todo: make $dataTypeId mandatory.
         *
         * @param DataValue $value
-        * @param string    $dataTypeId
+        * @param string|null $dataTypeId
         *
         * @throws FormattingException
         * @return string
diff --git a/lib/includes/formatters/DispatchingValueFormatter.php 
b/lib/includes/formatters/DispatchingValueFormatter.php
index b55349f..741c17f 100644
--- a/lib/includes/formatters/DispatchingValueFormatter.php
+++ b/lib/includes/formatters/DispatchingValueFormatter.php
@@ -65,7 +65,7 @@
         * @see TypedValueFormatter::formatValue
         *
         * @param DataValue $value
-        * @param string    $dataTypeId
+        * @param string|null $dataTypeId
         *
         * @throws FormattingException
         * @return string
diff --git a/lib/includes/formatters/PropertyValueSnakFormatter.php 
b/lib/includes/formatters/PropertyValueSnakFormatter.php
index 8964b07..2ee1d2f 100644
--- a/lib/includes/formatters/PropertyValueSnakFormatter.php
+++ b/lib/includes/formatters/PropertyValueSnakFormatter.php
@@ -168,7 +168,7 @@
         * Calls the TypedValueFormatter passed to the constructor.
         *
         * @param DataValue $value
-        * @param string $dataTypeId
+        * @param string|null $dataTypeId
         *
         * @throws FormattingException
         * @return string Either plain text, wikitext or HTML, depending on the 
$valueFormatter
diff --git a/lib/includes/serialization/CallbackFactory.php 
b/lib/includes/serialization/CallbackFactory.php
index 9ed69aa..b401c73 100644
--- a/lib/includes/serialization/CallbackFactory.php
+++ b/lib/includes/serialization/CallbackFactory.php
@@ -33,7 +33,7 @@
         * Get callable to index array with the given tag name
         *
         * @param string $type
-        * @param string $kvpKeyName
+        * @param string|null $kvpKeyName
         *
         * @return callable
         */
diff --git a/lib/includes/sites/SitesBuilder.php 
b/lib/includes/sites/SitesBuilder.php
index dc0dc88..62414fa 100644
--- a/lib/includes/sites/SitesBuilder.php
+++ b/lib/includes/sites/SitesBuilder.php
@@ -38,8 +38,8 @@
 
        /**
         * @param Site[] $sites
-        * @param string $siteGroup
-        * @param string $wikiId
+        * @param string|null $siteGroup
+        * @param string|null $wikiId
         */
        public function buildStore( array $sites, $siteGroup = null, $wikiId = 
null ) {
                if ( $siteGroup === null && is_string( $wikiId ) ) {
diff --git a/lib/tests/phpunit/Interactors/TermIndexSearchInteractorTest.php 
b/lib/tests/phpunit/Interactors/TermIndexSearchInteractorTest.php
index ea06766..4a04358 100644
--- a/lib/tests/phpunit/Interactors/TermIndexSearchInteractorTest.php
+++ b/lib/tests/phpunit/Interactors/TermIndexSearchInteractorTest.php
@@ -153,10 +153,10 @@
        }
 
        /**
-        * @param bool $caseSensitive
-        * @param bool $prefixSearch
-        * @param int $limit
-        * @param bool $useFallback
+        * @param bool|null $caseSensitive
+        * @param bool|null $prefixSearch
+        * @param int|null $limit
+        * @param bool|null $useFallback
         *
         * @return TermIndexSearchInteractor
         */
diff --git a/lib/tests/phpunit/formatters/EntityIdHtmlLinkFormatterTest.php 
b/lib/tests/phpunit/formatters/EntityIdHtmlLinkFormatterTest.php
index dcf142c..e2abb96 100644
--- a/lib/tests/phpunit/formatters/EntityIdHtmlLinkFormatterTest.php
+++ b/lib/tests/phpunit/formatters/EntityIdHtmlLinkFormatterTest.php
@@ -27,7 +27,7 @@
 class EntityIdHtmlLinkFormatterTest extends MediaWikiTestCase {
 
        /**
-        * @param Term $term
+        * @param Term|null $term
         *
         * @return LabelDescriptionLookup
         */
diff --git a/lib/tests/phpunit/includes/modules/SitesModuleWorkerTest.php 
b/lib/tests/phpunit/includes/modules/SitesModuleWorkerTest.php
index 74ebeff..0f1d6f2 100644
--- a/lib/tests/phpunit/includes/modules/SitesModuleWorkerTest.php
+++ b/lib/tests/phpunit/includes/modules/SitesModuleWorkerTest.php
@@ -30,7 +30,7 @@
         * @param Site[] $sites
         * @param string[] $groups
         * @param string[] $specialGroups
-        * @param BagOStuff $cache
+        * @param BagOStuff|null $cache
         *
         * @return SitesModuleWorker
         */
diff --git a/lib/tests/phpunit/store/MockTermIndex.php 
b/lib/tests/phpunit/store/MockTermIndex.php
index 9e0dec2..5e13f1c 100644
--- a/lib/tests/phpunit/store/MockTermIndex.php
+++ b/lib/tests/phpunit/store/MockTermIndex.php
@@ -44,7 +44,7 @@
         *
         * @param string[] $entityType The relevant entity type
         * @param string[] $labels The label to look for
-        * @param array[] $aliases
+        * @param array[]|null $aliases
         *
         * @throws InvalidArgumentException
         * @return EntityId[]
diff --git a/lib/tests/phpunit/store/RevisionBasedEntityLookupTest.php 
b/lib/tests/phpunit/store/RevisionBasedEntityLookupTest.php
index 83d7408..9c4f850 100644
--- a/lib/tests/phpunit/store/RevisionBasedEntityLookupTest.php
+++ b/lib/tests/phpunit/store/RevisionBasedEntityLookupTest.php
@@ -42,7 +42,7 @@
         *
         * @param EntityRevisionLookup $revisionLookup
         * @param EntityId $id
-        * @param EntityId $expected
+        * @param EntityId|null $expected
         */
        public function testGetEntity( EntityRevisionLookup $revisionLookup, 
EntityId $id, EntityId $expected = null ) {
                $entityLookup = new RevisionBasedEntityLookup( $revisionLookup 
);
diff --git a/purtle/src/RdfWriter.php b/purtle/src/RdfWriter.php
index d5abc80..2a9baf3 100644
--- a/purtle/src/RdfWriter.php
+++ b/purtle/src/RdfWriter.php
@@ -137,7 +137,7 @@
         * Should fail if called at an inappropriate time in the output 
sequence.
         *
         * @param string $value the value encoded as a string
-        * @param string $typeBase The data type's QName prefix if $typeLocal 
is given,
+        * @param string|null $typeBase The data type's QName prefix if 
$typeLocal is given,
         *        or an IRI or shorthand if $typeLocal is null.
         * @param string|null $typeLocal The data type's  QName suffix,
         *        or null if $typeBase is an IRI or shorthand.
diff --git a/purtle/src/RdfWriterBase.php b/purtle/src/RdfWriterBase.php
index ee1b3b9..b36571c 100644
--- a/purtle/src/RdfWriterBase.php
+++ b/purtle/src/RdfWriterBase.php
@@ -99,7 +99,7 @@
 
        /**
         * @param string $role The writer's role, use the XXX_ROLE constants.
-        * @param BNodeLabeler $labeler
+        * @param BNodeLabeler|null $labeler
         *
         * @throws InvalidArgumentException
         */
@@ -385,7 +385,7 @@
         * @see RdfWriter::say()
         *
         * @param string $base A QName prefix.
-        * @param string $local A QName suffix.
+        * @param string|null $local A QName suffix.
         *
         * @return RdfWriter $this
         */
@@ -440,7 +440,7 @@
         * @see RdfWriter::value()
         *
         * @param string $value the value encoded as a string
-        * @param string $typeBase The data type's QName prefix if $typeLocal 
is given,
+        * @param string|null $typeBase The data type's QName prefix if 
$typeLocal is given,
         *        or an IRI or shorthand if $typeLocal is null.
         * @param string|null $typeLocal The data type's  QName suffix,
         *        or null if $typeBase is an IRI or shorthand.
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 24d3da8..eeb930d 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -222,7 +222,7 @@
         * @param User &$user
         * @param string $reason
         * @param int $id id of the article that was deleted
-        * @param Content $content
+        * @param Content|null $content
         * @param LogEntry $logEntry
         *
         * @throws MWException
diff --git a/repo/includes/ChangeOp/ChangeOpLabel.php 
b/repo/includes/ChangeOp/ChangeOpLabel.php
index dc5cfce..da7da15 100644
--- a/repo/includes/ChangeOp/ChangeOpLabel.php
+++ b/repo/includes/ChangeOp/ChangeOpLabel.php
@@ -75,7 +75,7 @@
         * @see ChangeOp::apply()
         *
         * @param Entity $entity
-        * @param Summary $summary
+        * @param Summary|null $summary
         */
        public function apply( Entity $entity, Summary $summary = null ) {
                $fingerprint = $entity->getFingerprint();
diff --git a/repo/includes/ChangeOp/ChangeOpQualifier.php 
b/repo/includes/ChangeOp/ChangeOpQualifier.php
index 0ab7c71..610e2d3 100644
--- a/repo/includes/ChangeOp/ChangeOpQualifier.php
+++ b/repo/includes/ChangeOp/ChangeOpQualifier.php
@@ -101,7 +101,7 @@
         * @since 0.4
         *
         * @param SnakList $qualifiers
-        * @param Summary $summary
+        * @param Summary|null $summary
         *
         * @throws ChangeOpException
         */
@@ -118,7 +118,7 @@
         * @since 0.4
         *
         * @param SnakList $qualifiers
-        * @param Summary $summary
+        * @param Summary|null $summary
         *
         * @throws ChangeOpException
         */
diff --git a/repo/includes/ChangeOp/ChangeOpQualifierRemove.php 
b/repo/includes/ChangeOp/ChangeOpQualifierRemove.php
index de6f403..592dada 100644
--- a/repo/includes/ChangeOp/ChangeOpQualifierRemove.php
+++ b/repo/includes/ChangeOp/ChangeOpQualifierRemove.php
@@ -77,7 +77,7 @@
 
        /**
         * @param SnakList $qualifiers
-        * @param Summary $summary
+        * @param Summary|null $summary
         *
         * @throws ChangeOpException
         */
diff --git a/repo/includes/ChangeOp/ChangeOpReference.php 
b/repo/includes/ChangeOp/ChangeOpReference.php
index 6eed4e1..420fdc7 100644
--- a/repo/includes/ChangeOp/ChangeOpReference.php
+++ b/repo/includes/ChangeOp/ChangeOpReference.php
@@ -127,7 +127,7 @@
         * @since 0.4
         *
         * @param ReferenceList $references
-        * @param Summary $summary
+        * @param Summary|null $summary
         *
         * @throws ChangeOpException
         */
@@ -144,7 +144,7 @@
         * @since 0.4
         *
         * @param ReferenceList $references
-        * @param Summary $summary
+        * @param Summary|null $summary
         *
         * @throws ChangeOpException
         */
diff --git a/repo/includes/ChangeOp/ChangeOpReferenceRemove.php 
b/repo/includes/ChangeOp/ChangeOpReferenceRemove.php
index 696bd05..76dd468 100644
--- a/repo/includes/ChangeOp/ChangeOpReferenceRemove.php
+++ b/repo/includes/ChangeOp/ChangeOpReferenceRemove.php
@@ -82,7 +82,7 @@
         * @since 0.4
         *
         * @param ReferenceList $references
-        * @param Summary $summary
+        * @param Summary|null $summary
         *
         * @throws ChangeOpException
         */
diff --git a/repo/includes/EditEntity.php b/repo/includes/EditEntity.php
index 30d2980..a061c92 100644
--- a/repo/includes/EditEntity.php
+++ b/repo/includes/EditEntity.php
@@ -485,8 +485,8 @@
         * Check if no edits were made by other users since the given revision.
         * This makes the assumption that revision ids are monotonically 
increasing.
         *
-        * @param User $user
-        * @param EntityId $entityId
+        * @param User|null $user
+        * @param EntityId|null $entityId
         * @param int|bool $lastRevId
         *
         * @return bool
diff --git a/repo/includes/api/ModifyEntity.php 
b/repo/includes/api/ModifyEntity.php
index af4deb8..9d14028 100644
--- a/repo/includes/api/ModifyEntity.php
+++ b/repo/includes/api/ModifyEntity.php
@@ -361,7 +361,7 @@
         *
         * @param ChangeOp $changeOp
         * @param Entity $entity
-        * @param Summary $summary The summary object to update with 
information about the change.
+        * @param Summary|null $summary The summary object to update with 
information about the change.
         *
         * @throws UsageException
         */
diff --git a/repo/includes/api/StatementModificationHelper.php 
b/repo/includes/api/StatementModificationHelper.php
index e1c1839..d81e439 100644
--- a/repo/includes/api/StatementModificationHelper.php
+++ b/repo/includes/api/StatementModificationHelper.php
@@ -178,7 +178,7 @@
         *
         * @param ChangeOp $changeOp
         * @param Entity $entity
-        * @param Summary $summary The summary object to update with 
information about the change.
+        * @param Summary|null $summary The summary object to update with 
information about the change.
         */
        public function applyChangeOp( ChangeOp $changeOp, Entity $entity, 
Summary $summary = null ) {
                try {
diff --git a/repo/includes/content/ItemContent.php 
b/repo/includes/content/ItemContent.php
index 30e9cde..4548642 100644
--- a/repo/includes/content/ItemContent.php
+++ b/repo/includes/content/ItemContent.php
@@ -211,7 +211,7 @@
        /**
         * @see EntityContent::isCountable
         *
-        * @param bool $hasLinks
+        * @param bool|null $hasLinks
         *
         * @return bool True if this is not a redirect and the item is not 
empty.
         */
diff --git a/repo/includes/content/PropertyContent.php 
b/repo/includes/content/PropertyContent.php
index 3f35d6f..2954527 100644
--- a/repo/includes/content/PropertyContent.php
+++ b/repo/includes/content/PropertyContent.php
@@ -122,7 +122,7 @@
        /**
         * @see EntityContent::isCountable
         *
-        * @param bool $hasLinks
+        * @param bool|null $hasLinks
         *
         * @return bool True if this is not a redirect and the property is not 
empty.
         */
diff --git a/repo/includes/specials/SpecialItemDisambiguation.php 
b/repo/includes/specials/SpecialItemDisambiguation.php
index a874fea..308c286 100644
--- a/repo/includes/specials/SpecialItemDisambiguation.php
+++ b/repo/includes/specials/SpecialItemDisambiguation.php
@@ -67,7 +67,7 @@
         * services.
         *
         * @param ItemDisambiguation $itemDisambiguation
-        * @param TermIndexSearchInteractor|null $searchInteractor
+        * @param TermIndexSearchInteractor $searchInteractor
         * @param ContentLanguages $contentLanguages
         */
        public function initServices(
diff --git a/repo/includes/specials/SpecialModifyEntity.php 
b/repo/includes/specials/SpecialModifyEntity.php
index 36a73de..51d50a3 100644
--- a/repo/includes/specials/SpecialModifyEntity.php
+++ b/repo/includes/specials/SpecialModifyEntity.php
@@ -145,7 +145,7 @@
        /**
         * Building the HTML form for modifying an entity.
         *
-        * @param Entity $entity
+        * @param Entity|null $entity
         */
        private function setForm( Entity $entity = null ) {
                $this->addCopyrightText();
@@ -215,7 +215,7 @@
         *
         * @since 0.5
         *
-        * @param Entity $entity
+        * @param Entity|null $entity
         *
         * @return string HTML
         */
@@ -272,7 +272,7 @@
         *
         * @param ChangeOp $changeOp
         * @param Entity $entity
-        * @param Summary $summary The summary object to update with 
information about the change.
+        * @param Summary|null $summary The summary object to update with 
information about the change.
         *
         * @throws ChangeOpException
         */
diff --git a/repo/includes/specials/SpecialModifyTerm.php 
b/repo/includes/specials/SpecialModifyTerm.php
index 05da05b..bb15023 100644
--- a/repo/includes/specials/SpecialModifyTerm.php
+++ b/repo/includes/specials/SpecialModifyTerm.php
@@ -182,7 +182,7 @@
        /**
         * @see SpecialModifyEntity::getFormElements()
         *
-        * @param Entity $entity
+        * @param Entity|null $entity
         *
         * @return string
         */
diff --git a/repo/includes/specials/SpecialSetLabelDescriptionAliases.php 
b/repo/includes/specials/SpecialSetLabelDescriptionAliases.php
index 2abe270..bef12cc 100644
--- a/repo/includes/specials/SpecialSetLabelDescriptionAliases.php
+++ b/repo/includes/specials/SpecialSetLabelDescriptionAliases.php
@@ -146,7 +146,7 @@
        /**
         * @see SpecialModifyEntity::getFormElements
         *
-        * @param Entity $entity
+        * @param Entity|null $entity
         *
         * @return string HTML
         */
diff --git a/repo/includes/specials/SpecialSetSiteLink.php 
b/repo/includes/specials/SpecialSetSiteLink.php
index e685c97..c21e742 100644
--- a/repo/includes/specials/SpecialSetSiteLink.php
+++ b/repo/includes/specials/SpecialSetSiteLink.php
@@ -201,7 +201,7 @@
        /**
         * @see SpecialModifyEntity::getFormElements()
         *
-        * @param Entity $entity
+        * @param Entity|null $entity
         *
         * @return string
         */
diff --git a/repo/includes/store/EntityPerPage.php 
b/repo/includes/store/EntityPerPage.php
index 09b044a..84175f8 100644
--- a/repo/includes/store/EntityPerPage.php
+++ b/repo/includes/store/EntityPerPage.php
@@ -63,7 +63,7 @@
         *
         * @param null|string $entityType The entity type to look for.
         * @param int $limit The maximum number of IDs to return.
-        * @param EntityId $after Only return entities with IDs greater than 
this.
+        * @param EntityId|null $after Only return entities with IDs greater 
than this.
         * @param mixed $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
         *
         * @return EntityId[]
diff --git a/repo/includes/store/sql/ChangesSubscriptionTableBuilder.php 
b/repo/includes/store/sql/ChangesSubscriptionTableBuilder.php
index 84f2ca3..8e59d26 100644
--- a/repo/includes/store/sql/ChangesSubscriptionTableBuilder.php
+++ b/repo/includes/store/sql/ChangesSubscriptionTableBuilder.php
@@ -114,7 +114,7 @@
        /**
         * Fill the subscription table with rows based on entries in 
wb_items_per_site.
         *
-        * @param ItemId $startItem The item to start with.
+        * @param ItemId|null $startItem The item to start with.
         */
        public function fillSubscriptionTable( ItemId $startItem = null ) {
                $continuation = $startItem === null ? null : array( 
$startItem->getNumericId(), 0 );
diff --git a/repo/includes/store/sql/EntityPerPageTable.php 
b/repo/includes/store/sql/EntityPerPageTable.php
index da8a138..b70537c 100644
--- a/repo/includes/store/sql/EntityPerPageTable.php
+++ b/repo/includes/store/sql/EntityPerPageTable.php
@@ -64,7 +64,7 @@
         *
         * @param EntityId $entityId
         * @param int $pageId
-        * @param EntityId $targetId
+        * @param EntityId|null $targetId
         *
         * @throws InvalidArgumentException
         */
@@ -319,7 +319,7 @@
         *
         * @param null|string $entityType The entity type to look for.
         * @param int $limit The maximum number of IDs to return.
-        * @param EntityId $after Only return entities with IDs greater than 
this.
+        * @param EntityId|null $after Only return entities with IDs greater 
than this.
         * @param mixed $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
         *
         * @throws InvalidArgumentException
diff --git a/repo/maintenance/dumpEntities.php 
b/repo/maintenance/dumpEntities.php
index e22f3c0..9d013d3 100644
--- a/repo/maintenance/dumpEntities.php
+++ b/repo/maintenance/dumpEntities.php
@@ -188,7 +188,7 @@
 
        /**
         * @param null|string $entityType
-        * @param ExceptionHandler $exceptionReporter
+        * @param ExceptionHandler|null $exceptionReporter
         *
         * @return EntityIdPager a stream of EntityId objects
         */
@@ -225,7 +225,7 @@
 
        /**
         * @param string $listFile
-        * @param ExceptionHandler $exceptionReporter
+        * @param ExceptionHandler|null $exceptionReporter
         *
         * @throws MWException
         * @return EntityIdPager
diff --git a/repo/tests/phpunit/MockEntityPerPage.php 
b/repo/tests/phpunit/MockEntityPerPage.php
index b372c2e..c6cd937 100644
--- a/repo/tests/phpunit/MockEntityPerPage.php
+++ b/repo/tests/phpunit/MockEntityPerPage.php
@@ -57,7 +57,7 @@
         *
         * @param null|string $entityType The entity type to look for.
         * @param int $limit The maximum number of IDs to return.
-        * @param EntityId $after Only return entities with IDs greater than 
this.
+        * @param EntityId|null $after Only return entities with IDs greater 
than this.
         * @param mixed $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
         *
         * @return EntityId[]
diff --git a/repo/tests/phpunit/includes/ChangeDispatcherTest.php 
b/repo/tests/phpunit/includes/ChangeDispatcherTest.php
index 8469101..367f054 100644
--- a/repo/tests/phpunit/includes/ChangeDispatcherTest.php
+++ b/repo/tests/phpunit/includes/ChangeDispatcherTest.php
@@ -169,7 +169,7 @@
         * @param int $changeId
         * @param EntityId $entityId
         * @param string $time
-        * @param Diff $siteLinkDiff
+        * @param Diff|null $siteLinkDiff
         *
         * @return Change
         */
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
index fbef6bf..e3fc5b8 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
@@ -491,7 +491,7 @@
        }
 
        /**
-        * @param array $returnValue
+        * @param array|null $returnValue
         *
         * @return SiteLinkConflictLookup
         */
diff --git a/repo/tests/phpunit/includes/EditEntityTest.php 
b/repo/tests/phpunit/includes/EditEntityTest.php
index da21a9d..f90e159 100644
--- a/repo/tests/phpunit/includes/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/EditEntityTest.php
@@ -128,7 +128,7 @@
         * @param EntityTitleLookup $titleLookup
         * @param User|null $user
         * @param bool $baseRevId
-        * @param EditFilterHookRunner $editFilterHookRunner
+        * @param EditFilterHookRunner|null $editFilterHookRunner
         *
         * @param null|array $permissions map of actions to bool, indicating 
which actions are allowed.
         *
diff --git 
a/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php 
b/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
index 7100365..cbfb795 100644
--- a/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
+++ b/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
@@ -97,7 +97,7 @@
        }
 
        /**
-        * @param User $user
+        * @param User|null $user
         *
         * @return ItemMergeInteractor
         */
diff --git 
a/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php 
b/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
index 6df210f..ee9cd67 100644
--- a/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
+++ b/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
@@ -154,7 +154,7 @@
         * @dataProvider validFingerprintProvider
         *
         * @param Fingerprint $fingerprint
-        * @param EntityId|null $entityId
+        * @param EntityId $entityId
         * @param string[]|null $languageCodes
         */
        public function testValidateFingerprint(
diff --git a/repo/tests/phpunit/includes/actions/ActionTestCase.php 
b/repo/tests/phpunit/includes/actions/ActionTestCase.php
index d95796a..c473a3f 100644
--- a/repo/tests/phpunit/includes/actions/ActionTestCase.php
+++ b/repo/tests/phpunit/includes/actions/ActionTestCase.php
@@ -220,7 +220,7 @@
         * Changes wgUser and resets any associated state
         *
         * @param User $user the desired user
-        * @param array $session optional session data
+        * @param array|null $session optional session data
         */
        protected function setUser( User $user, array $session = null ) {
                global $wgUser;
diff --git a/repo/tests/phpunit/includes/api/ApiModuleTestHelper.php 
b/repo/tests/phpunit/includes/api/ApiModuleTestHelper.php
index 0acd70a..b290076 100644
--- a/repo/tests/phpunit/includes/api/ApiModuleTestHelper.php
+++ b/repo/tests/phpunit/includes/api/ApiModuleTestHelper.php
@@ -23,7 +23,7 @@
         *        Will be called with two parameters, the ApiMain instance and 
$name.
         * @param string $name
         * @param array $params Request parameter. The 'token' parameter will 
be supplied automatically.
-        * @param User $user Defaults to the global user object
+        * @param User|null $user Defaults to the global user object
         *
         * @return ApiBase
         */
diff --git a/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php 
b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
index 35f40ab..02330e9 100644
--- a/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
+++ b/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
@@ -289,7 +289,7 @@
 
        /**
         * @param string $xml
-        * @param string $entityId
+        * @param string|null $entityId
         *
         * @return string
         */
diff --git a/repo/tests/phpunit/includes/api/CreateRedirectTest.php 
b/repo/tests/phpunit/includes/api/CreateRedirectTest.php
index aa6f6c3..b4f024b 100644
--- a/repo/tests/phpunit/includes/api/CreateRedirectTest.php
+++ b/repo/tests/phpunit/includes/api/CreateRedirectTest.php
@@ -97,7 +97,7 @@
 
        /**
         * @param array $params
-        * @param User $user
+        * @param User|null $user
         *
         * @return CreateRedirect
         */
diff --git a/repo/tests/phpunit/includes/api/EntityTestHelper.php 
b/repo/tests/phpunit/includes/api/EntityTestHelper.php
index 27031a5..3769d37 100644
--- a/repo/tests/phpunit/includes/api/EntityTestHelper.php
+++ b/repo/tests/phpunit/includes/api/EntityTestHelper.php
@@ -341,7 +341,7 @@
         *
         * @param string $handle
         * @param string $id
-        * @param array $entity
+        * @param array|null $entity
         */
        public static function registerEntity( $handle, $id, array $entity = 
null ) {
                self::$activeHandles[ $handle ] = $id;
diff --git a/repo/tests/phpunit/includes/api/SetClaimTest.php 
b/repo/tests/phpunit/includes/api/SetClaimTest.php
index e65ab31..99b5872 100644
--- a/repo/tests/phpunit/includes/api/SetClaimTest.php
+++ b/repo/tests/phpunit/includes/api/SetClaimTest.php
@@ -283,7 +283,7 @@
         * @param string $requestLabel A label to identify requests that are 
made in errors.
         * @param int|null $index
         * @param int|null $baserevid
-        * @param string $error
+        * @param string|null $error
         */
        private function makeRequest(
                $statement,
diff --git a/repo/tests/phpunit/includes/content/EntityContentTest.php 
b/repo/tests/phpunit/includes/content/EntityContentTest.php
index 017f698..5136746 100644
--- a/repo/tests/phpunit/includes/content/EntityContentTest.php
+++ b/repo/tests/phpunit/includes/content/EntityContentTest.php
@@ -74,7 +74,7 @@
        abstract protected function getDummyId();
 
        /**
-        * @param EntityId $entityId
+        * @param EntityId|null $entityId
         *
         * @return EntityContent
         */
@@ -330,7 +330,7 @@
         *
         * @param EntityContent $base
         * @param EntityContentDiff $patch
-        * @param EntityContent $expected
+        * @param EntityContent|null $expected
         */
        public function testGetPatchedCopy( EntityContent $base, 
EntityContentDiff $patch, EntityContent $expected = null ) {
                if ( $expected === null ) {
diff --git a/repo/tests/phpunit/includes/content/EntityHandlerTest.php 
b/repo/tests/phpunit/includes/content/EntityHandlerTest.php
index a6f4930..3ab97e6 100644
--- a/repo/tests/phpunit/includes/content/EntityHandlerTest.php
+++ b/repo/tests/phpunit/includes/content/EntityHandlerTest.php
@@ -290,7 +290,7 @@
         * @param Revision $latestRevision
         * @param Revision $newerRevision
         * @param Revision $olderRevision
-        * @param EntityContent $expected
+        * @param EntityContent|null $expected
         * @param string $message
         */
        public function testGetUndoContent(
diff --git a/repo/tests/phpunit/includes/content/ItemContentTest.php 
b/repo/tests/phpunit/includes/content/ItemContentTest.php
index 6c6d122..cc20ade 100644
--- a/repo/tests/phpunit/includes/content/ItemContentTest.php
+++ b/repo/tests/phpunit/includes/content/ItemContentTest.php
@@ -47,7 +47,7 @@
        }
 
        /**
-        * @param EntityId $itemId
+        * @param EntityId|null $itemId
         *
         * @return ItemContent
         */
diff --git a/repo/tests/phpunit/includes/content/ItemHandlerTest.php 
b/repo/tests/phpunit/includes/content/ItemHandlerTest.php
index 6bd9fd3..2b6e082 100644
--- a/repo/tests/phpunit/includes/content/ItemHandlerTest.php
+++ b/repo/tests/phpunit/includes/content/ItemHandlerTest.php
@@ -88,7 +88,7 @@
        }
 
        /**
-        * @param Entity $entity
+        * @param Entity|null $entity
         *
         * @return EntityContent
         */
@@ -132,7 +132,7 @@
        }
 
        /**
-        * @param SettingsArray $settings
+        * @param SettingsArray|null $settings
         *
         * @return ItemHandler
         */
diff --git a/repo/tests/phpunit/includes/content/PropertyContentTest.php 
b/repo/tests/phpunit/includes/content/PropertyContentTest.php
index aae29b4..4ca5b78 100644
--- a/repo/tests/phpunit/includes/content/PropertyContentTest.php
+++ b/repo/tests/phpunit/includes/content/PropertyContentTest.php
@@ -31,7 +31,7 @@
        }
 
        /**
-        * @param EntityId $propertyId
+        * @param EntityId|null $propertyId
         *
         * @return PropertyContent
         */
diff --git a/repo/tests/phpunit/includes/content/PropertyHandlerTest.php 
b/repo/tests/phpunit/includes/content/PropertyHandlerTest.php
index 8f9bdae..15d9db6 100644
--- a/repo/tests/phpunit/includes/content/PropertyHandlerTest.php
+++ b/repo/tests/phpunit/includes/content/PropertyHandlerTest.php
@@ -90,7 +90,7 @@
        }
 
        /**
-        * @param SettingsArray $settings
+        * @param SettingsArray|null $settings
         *
         * @return PropertyHandler
         */
diff --git a/repo/tests/phpunit/includes/rdf/FullStatementsRdfBuilderTest.php 
b/repo/tests/phpunit/includes/rdf/FullStatementsRdfBuilderTest.php
index 4ae04e0..5f4bc1f 100644
--- a/repo/tests/phpunit/includes/rdf/FullStatementsRdfBuilderTest.php
+++ b/repo/tests/phpunit/includes/rdf/FullStatementsRdfBuilderTest.php
@@ -50,7 +50,7 @@
         * @param RdfWriter $writer
         * @param int $flavor Bitmap for the output flavor, use 
RdfProducer::PRODUCE_XXX constants.
         * @param EntityId[] &$mentioned Receives any entity IDs being 
mentioned.
-        * @param DedupeBag $dedupe A bag of reference hashes that should be 
considered "already seen".
+        * @param DedupeBag|null $dedupe A bag of reference hashes that should 
be considered "already seen".
         *
         * @return FullStatementRdfBuilder
         */
diff --git a/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php 
b/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
index 186367f..83027be 100644
--- a/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
+++ b/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
@@ -378,9 +378,9 @@
         * @param WikiPageEntityStore $store
         * @param Entity $entity
         * @param string $summary
-        * @param User $user
+        * @param User|null $user
         * @param int $flags
-        * @param bool $baseRevId
+        * @param int|bool $baseRevId
         *
         * @return Status
         */
diff --git a/view/src/EntityTermsView.php b/view/src/EntityTermsView.php
index 5344bc9..a23ed17 100644
--- a/view/src/EntityTermsView.php
+++ b/view/src/EntityTermsView.php
@@ -95,7 +95,7 @@
 
        /**
         * @param Fingerprint $fingerprint
-        * @param EntityId $entityId
+        * @param EntityId|null $entityId
         *
         * @return string HTML
         */
diff --git a/view/tests/phpunit/EntityViewPlaceholderExpanderTest.php 
b/view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
index ef901b7..7dc33d0 100644
--- a/view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
+++ b/view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
@@ -74,7 +74,7 @@
        }
 
        /**
-        * @param Item $item
+        * @param Item|null $item
         * @param int $revId
         *
         * @return EntityRevisionLookup

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3980012501b15d5e12510f0b0e60606ff9830b4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

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

Reply via email to