Thiemo Kreuz (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400569 )

Change subject: Remove some obvious, self-explaining PHPDoc snippets
......................................................................

Remove some obvious, self-explaining PHPDoc snippets

Having a snippet of documentation that does not add anything to whats
already obvious from the function/variable names and types is worse
than having no documentation: it must be maintained, and one must read
it first to understand it does not explain anything.

Change-Id: Ie86727322daf6d1877fb498bb54674660d2c2b89
---
M client/includes/LangLinkHandler.php
M lib/includes/Store/EntityStore.php
M lib/includes/Store/TermPropertyLabelResolver.php
M lib/tests/phpunit/MockRepository.php
M repo/Wikibase.hooks.php
M repo/includes/Content/EntityContent.php
M repo/includes/Content/EntityHandler.php
M repo/includes/Store/Sql/SqlStore.php
M repo/includes/Store/Sql/WikiPageEntityStore.php
M repo/maintenance/searchEntities.php
M tests/phan/stubs/scribunto.php
11 files changed, 15 insertions(+), 14 deletions(-)


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

diff --git a/client/includes/LangLinkHandler.php 
b/client/includes/LangLinkHandler.php
index 222c3cd..0d14604 100644
--- a/client/includes/LangLinkHandler.php
+++ b/client/includes/LangLinkHandler.php
@@ -62,8 +62,8 @@
        /**
         * @param LanguageLinkBadgeDisplay $badgeDisplay
         * @param NamespaceChecker $namespaceChecker determines which 
namespaces wikibase is enabled on
-        * @param SiteLinkLookup $siteLinkLookup A site link lookup service
-        * @param EntityLookup $entityLookup An entity lookup service
+        * @param SiteLinkLookup $siteLinkLookup
+        * @param EntityLookup $entityLookup
         * @param SiteLookup $siteLookup
         * @param string $siteId The global site ID for the local wiki
         * @param string $siteGroup The ID of the site group to use for showing 
language links.
diff --git a/lib/includes/Store/EntityStore.php 
b/lib/includes/Store/EntityStore.php
index 689584a..b3330b2 100644
--- a/lib/includes/Store/EntityStore.php
+++ b/lib/includes/Store/EntityStore.php
@@ -98,7 +98,7 @@
         *
         * @see EditPage::userWasLastToEdit()
         *
-        * @param User $user the user
+        * @param User $user
         * @param EntityId $id the entity to check
         * @param int $lastRevId the revision to check from
         *
diff --git a/lib/includes/Store/TermPropertyLabelResolver.php 
b/lib/includes/Store/TermPropertyLabelResolver.php
index d3218d4..9869e94 100644
--- a/lib/includes/Store/TermPropertyLabelResolver.php
+++ b/lib/includes/Store/TermPropertyLabelResolver.php
@@ -78,7 +78,7 @@
        }
 
        /**
-        * @param string[] $labels the labels
+        * @param string[] $labels
         * @param string $recache Flag, set to 'recache' to fetch fresh data 
from the database.
         *
         * @return EntityId[] a map of strings from $labels to the 
corresponding entity ID.
diff --git a/lib/tests/phpunit/MockRepository.php 
b/lib/tests/phpunit/MockRepository.php
index 52cb066..157d82a 100644
--- a/lib/tests/phpunit/MockRepository.php
+++ b/lib/tests/phpunit/MockRepository.php
@@ -556,7 +556,7 @@
         *
         * @see EditPage::userWasLastToEdit
         *
-        * @param User $user the user
+        * @param User $user
         * @param EntityId $entityId the entity to check
         * @param int $lastRevisionId the revision to check from
         *
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index ee2304b..d56e039 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -635,7 +635,7 @@
         * Hook handler for AbuseFilter's AbuseFilter-contentToString hook, 
implemented
         * to provide a custom text representation of Entities for filtering.
         *
-        * @param Content $content The content object
+        * @param Content $content
         * @param string  &$text The resulting text
         *
         * @return bool
diff --git a/repo/includes/Content/EntityContent.php 
b/repo/includes/Content/EntityContent.php
index 7beea52..e5605ff 100644
--- a/repo/includes/Content/EntityContent.php
+++ b/repo/includes/Content/EntityContent.php
@@ -6,6 +6,7 @@
 use Article;
 use Content;
 use DataUpdate;
+use DeferrableUpdate;
 use Diff\Differ\MapDiffer;
 use Diff\DiffOp\Diff\Diff;
 use Diff\Patcher\MapPatcher;
@@ -141,7 +142,7 @@
         * @param WikiPage $page
         * @param ParserOutput|null $parserOutput
         *
-        * @return DataUpdate[]
+        * @return DeferrableUpdate[]
         */
        public function getDeletionUpdates( WikiPage $page, ParserOutput 
$parserOutput = null ) {
                /* @var EntityHandler $handler */
diff --git a/repo/includes/Content/EntityHandler.php 
b/repo/includes/Content/EntityHandler.php
index fa31219..e4b0777 100644
--- a/repo/includes/Content/EntityHandler.php
+++ b/repo/includes/Content/EntityHandler.php
@@ -5,6 +5,7 @@
 use Content;
 use ContentHandler;
 use DataUpdate;
+use DeferrableUpdate;
 use Diff\Patcher\PatcherException;
 use Hooks;
 use Html;
@@ -621,7 +622,7 @@
         * @param EntityContent $content
         * @param Title $title
         *
-        * @return DataUpdate[]
+        * @return DeferrableUpdate[]
         */
        public function getEntityDeletionUpdates( EntityContent $content, Title 
$title ) {
                $updates = [];
diff --git a/repo/includes/Store/Sql/SqlStore.php 
b/repo/includes/Store/Sql/SqlStore.php
index ec69252..45313f0 100644
--- a/repo/includes/Store/Sql/SqlStore.php
+++ b/repo/includes/Store/Sql/SqlStore.php
@@ -561,7 +561,6 @@
        }
 
        /**
-        * Creates a new PropertyInfoLookup instance
         * Note: cache key used by the lookup should be the same as the cache 
key used
         * by CachedPropertyInfoStore.
         *
diff --git a/repo/includes/Store/Sql/WikiPageEntityStore.php 
b/repo/includes/Store/Sql/WikiPageEntityStore.php
index c5c335a..df836ae 100644
--- a/repo/includes/Store/Sql/WikiPageEntityStore.php
+++ b/repo/includes/Store/Sql/WikiPageEntityStore.php
@@ -351,7 +351,7 @@
         *
         * @see EditPage::userWasLastToEdit()
         *
-        * @param User $user the user
+        * @param User $user
         * @param EntityId $id the entity to check (ignored by this 
implementation)
         * @param int $lastRevId the revision the user supplied
         *
diff --git a/repo/maintenance/searchEntities.php 
b/repo/maintenance/searchEntities.php
index 86def17..dc8072e 100644
--- a/repo/maintenance/searchEntities.php
+++ b/repo/maintenance/searchEntities.php
@@ -56,7 +56,7 @@
 
        /**
         * Set wikibase repo to be used, e.g. for testing.
-        * @param WikibaseRepo $repo New repo
+        * @param WikibaseRepo $repo
         */
        public function setRepo( WikibaseRepo $repo ) {
                $this->repo = $repo;
diff --git a/tests/phan/stubs/scribunto.php b/tests/phan/stubs/scribunto.php
index f4fb373..fa181cb 100644
--- a/tests/phan/stubs/scribunto.php
+++ b/tests/phan/stubs/scribunto.php
@@ -9,7 +9,7 @@
 class Scribunto_LuaEngine {
 
        /**
-        * @param string $moduleFileName string
+        * @param string $moduleFileName
         * @param array $interfaceFuncs
         * @param array $setupOptions
         *
@@ -24,8 +24,8 @@
 
        /**
         * @param string $name
-        * @param int $argIdx integer
-        * @param mixed $arg mixed
+        * @param int $argIdx
+        * @param mixed $arg
         * @param string $expectType
         */
        protected function checkType( $name, $argIdx, $arg, $expectType ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie86727322daf6d1877fb498bb54674660d2c2b89
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Kreuz (WMDE) <thiemo.kr...@wikimedia.de>

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

Reply via email to