Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/177193
Change subject: Remove repeated var name from @var doc tags ...................................................................... Remove repeated var name from @var doc tags This is a copy & paste error. The var name must be repeated if the @var doc tag is used inline, but not for class properties. This also fixes some closely related mistakes in doc tags. Change-Id: I72b8ac68f2b68a2ed2a2bf5fdfd72ab1ae2506c4 --- M client/includes/Changes/ChangeHandler.php M client/includes/store/UsageUpdater.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/includes/Changes/ChangeHandlerTest.php M client/tests/phpunit/includes/LangLinkHandlerTest.php M lib/includes/ChangeNotificationJob.php M lib/includes/changes/EntityChange.php M lib/includes/serializers/SiteLinkSerializer.php M lib/includes/store/CachingEntityRevisionLookup.php M repo/includes/api/ModifyEntity.php M repo/includes/store/sql/EntityPerPageBuilder.php M repo/includes/store/sql/ItemsPerSiteBuilder.php M repo/includes/store/sql/PropertyInfoTableBuilder.php M repo/includes/store/sql/TermSearchKeyBuilder.php 14 files changed, 56 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/93/177193/1 diff --git a/client/includes/Changes/ChangeHandler.php b/client/includes/Changes/ChangeHandler.php index 037dfcd..8d4f72c 100644 --- a/client/includes/Changes/ChangeHandler.php +++ b/client/includes/Changes/ChangeHandler.php @@ -51,7 +51,7 @@ const HISTORY_ENTRY_ACTION = 16; /** - * @var PageUpdater $updater + * @var PageUpdater */ private $updater; @@ -263,7 +263,7 @@ * * @param EntityChange $change The Change that caused the update * - * @return array|boolean an array of RC attributes, + * @return array[]|bool an array of RC attributes, * or false if the change does not provide edit meta data */ private function getRCAttributes( EntityChange $change ) { diff --git a/client/includes/store/UsageUpdater.php b/client/includes/store/UsageUpdater.php index 77ee7a6..81f8c35 100644 --- a/client/includes/store/UsageUpdater.php +++ b/client/includes/store/UsageUpdater.php @@ -18,7 +18,7 @@ class UsageUpdater { /** - * @var string $clientId + * @var string */ private $clientId; diff --git a/client/includes/store/sql/DirectSqlStore.php b/client/includes/store/sql/DirectSqlStore.php index 251bcc6..88ea5fa 100644 --- a/client/includes/store/sql/DirectSqlStore.php +++ b/client/includes/store/sql/DirectSqlStore.php @@ -71,7 +71,7 @@ private $entityIdParser; /** - * @var String|bool $repoWiki + * @var string|bool */ protected $repoWiki; @@ -124,7 +124,7 @@ * @param EntityContentDataCodec $contentCodec * @param Language $wikiLanguage * @param EntityIdParser $entityIdParser - * @param string $repoWiki the symbolic database name of the repo wiki + * @param string|bool $repoWiki the symbolic database name of the repo wiki */ public function __construct( EntityContentDataCodec $contentCodec, diff --git a/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php b/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php index 57b5d06..a8608bd 100644 --- a/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php +++ b/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php @@ -39,7 +39,9 @@ */ class ChangeHandlerTest extends \MediaWikiTestCase { - /** @var Site $site */ + /** + * @var Site + */ protected $site; protected function setUp() { diff --git a/client/tests/phpunit/includes/LangLinkHandlerTest.php b/client/tests/phpunit/includes/LangLinkHandlerTest.php index e98fb3e..837fba6 100644 --- a/client/tests/phpunit/includes/LangLinkHandlerTest.php +++ b/client/tests/phpunit/includes/LangLinkHandlerTest.php @@ -31,12 +31,12 @@ class LangLinkHandlerTest extends \MediaWikiTestCase { /** - * @var MockRepository $mockRepo + * @var MockRepository */ private $mockRepo; /** - * @var LangLinkHandler $langLinkHandler + * @var LangLinkHandler */ private $langLinkHandler; diff --git a/lib/includes/ChangeNotificationJob.php b/lib/includes/ChangeNotificationJob.php index fdc8be4..1b5ee5a 100644 --- a/lib/includes/ChangeNotificationJob.php +++ b/lib/includes/ChangeNotificationJob.php @@ -16,7 +16,7 @@ class ChangeNotificationJob extends \Job { /** - * @var Change[] $changes: initialized lazily by getChanges(). + * @var Change[]|null */ private $changes = null; @@ -123,9 +123,7 @@ } /** - * Run the job - * - * @return boolean success + * @return bool success */ public function run() { $changes = $this->getChanges(); diff --git a/lib/includes/changes/EntityChange.php b/lib/includes/changes/EntityChange.php index 782ac97..632ce89 100644 --- a/lib/includes/changes/EntityChange.php +++ b/lib/includes/changes/EntityChange.php @@ -31,14 +31,14 @@ const RESTORE = 'restore'; /** - * @var EntityId $entityId + * @var EntityId|null */ private $entityId = null; /** - * @var string $comment + * @var string|null */ - protected $comment; + protected $comment = null; /** * @see ORMRow::setField diff --git a/lib/includes/serializers/SiteLinkSerializer.php b/lib/includes/serializers/SiteLinkSerializer.php index adbba47..9773753 100644 --- a/lib/includes/serializers/SiteLinkSerializer.php +++ b/lib/includes/serializers/SiteLinkSerializer.php @@ -25,7 +25,7 @@ class SiteLinkSerializer extends SerializerObject { /** - * @var SiteStore $siteStore + * @var SiteStore */ private $siteStore; diff --git a/lib/includes/store/CachingEntityRevisionLookup.php b/lib/includes/store/CachingEntityRevisionLookup.php index 968e403..807c312 100644 --- a/lib/includes/store/CachingEntityRevisionLookup.php +++ b/lib/includes/store/CachingEntityRevisionLookup.php @@ -29,21 +29,21 @@ private $cache; /** - * @var int $cacheTimeout + * @var int */ private $cacheTimeout; /** * The key prefix to use when caching entities in memory. * - * @var $cacheKeyPrefix + * @var string */ private $cacheKeyPrefix; /** - * @var bool $shouldVerifyRevision + * @var bool */ - private $shouldVerifyRevision; + private $shouldVerifyRevision = false; /** * @param EntityRevisionLookup $entityRevisionLookup The lookup to use diff --git a/repo/includes/api/ModifyEntity.php b/repo/includes/api/ModifyEntity.php index 96f0135..8696afe 100644 --- a/repo/includes/api/ModifyEntity.php +++ b/repo/includes/api/ModifyEntity.php @@ -67,7 +67,7 @@ * @see EditEntity::attemptSave * @see WikiPage::doEditContent * - * @var int $flags + * @var int */ protected $flags; diff --git a/repo/includes/store/sql/EntityPerPageBuilder.php b/repo/includes/store/sql/EntityPerPageBuilder.php index 5fb0dbd..0850da0 100644 --- a/repo/includes/store/sql/EntityPerPageBuilder.php +++ b/repo/includes/store/sql/EntityPerPageBuilder.php @@ -22,28 +22,28 @@ /** * @since 0.4 * - * @var EntityPerPage $entityPerPageTable + * @var EntityPerPage */ protected $entityPerPageTable; /** * @since 0.4 * - * @var EntityContentFactory $entityContentFactory + * @var EntityContentFactory */ protected $entityContentFactory; /** * @since 0.4 * - * @var EntityIdParser $entityIdParser + * @var EntityIdParser */ protected $entityIdParser; /** * @since 0.4 * - * @var MessageReporter $reporter + * @var MessageReporter */ protected $reporter; @@ -57,7 +57,7 @@ /** * Rebuild the entire table * - * @var boolean + * @var bool */ protected $rebuildAll = false; @@ -102,7 +102,7 @@ /** * @since 0.4 * - * @param boolean $rebuildAll + * @param bool $rebuildAll */ public function setRebuildAll( $rebuildAll ) { $this->rebuildAll = $rebuildAll; diff --git a/repo/includes/store/sql/ItemsPerSiteBuilder.php b/repo/includes/store/sql/ItemsPerSiteBuilder.php index 5ff6c4a..bc789f9 100644 --- a/repo/includes/store/sql/ItemsPerSiteBuilder.php +++ b/repo/includes/store/sql/ItemsPerSiteBuilder.php @@ -18,13 +18,20 @@ */ class ItemsPerSiteBuilder { + /** + * @var SiteLinkTable + */ private $siteLinkTable; + + /** + * @var EntityLookup + */ private $entityLookup; /** - * @var MessageReporter $reporter + * @var MessageReporter|null */ - private $reporter; + private $reporter = null; /** * The batch size, giving the number of rows to be updated in each database transaction. diff --git a/repo/includes/store/sql/PropertyInfoTableBuilder.php b/repo/includes/store/sql/PropertyInfoTableBuilder.php index 8b633df..cb62d69 100644 --- a/repo/includes/store/sql/PropertyInfoTableBuilder.php +++ b/repo/includes/store/sql/PropertyInfoTableBuilder.php @@ -18,13 +18,20 @@ */ class PropertyInfoTableBuilder { + /** + * @var PropertyInfoTable + */ private $propertyInfoTable; + + /** + * @var EntityLookup + */ private $entityLookup; /** - * @var MessageReporter $reporter + * @var MessageReporter|null */ - private $reporter; + private $reporter = null; /** * @var bool @@ -70,7 +77,7 @@ } /** - * @return boolean + * @return bool */ public function getRebuildAll() { return $this->shouldUpdateAllEntities; @@ -91,7 +98,7 @@ } /** - * @param boolean $all + * @param bool $all */ public function setRebuildAll( $all ) { $this->shouldUpdateAllEntities = $all; diff --git a/repo/includes/store/sql/TermSearchKeyBuilder.php b/repo/includes/store/sql/TermSearchKeyBuilder.php index 7ba2899..bea2edf 100644 --- a/repo/includes/store/sql/TermSearchKeyBuilder.php +++ b/repo/includes/store/sql/TermSearchKeyBuilder.php @@ -20,16 +20,16 @@ /** * @since 0.4 * - * @var TermSqlIndex $table + * @var TermSqlIndex */ protected $table; /** * @since 0.4 * - * @var MessageReporter $reporter + * @var MessageReporter|null */ - protected $reporter; + protected $reporter = null; /** * Whether all keys should be updated, or only missing keys @@ -39,9 +39,7 @@ protected $all = true; /** - * Whether all keys should be updated, or only missing keys - * - * @var bool + * @var int */ protected $fromId = 1; @@ -64,7 +62,7 @@ } /** - * @return boolean + * @return bool */ public function getRebuildAll() { return $this->all; @@ -78,14 +76,14 @@ } /** - * @return boolean + * @return int */ public function getFromId() { return $this->fromId; } /** - * @param boolean $all + * @param bool $all */ public function setRebuildAll( $all ) { $this->all = $all; @@ -99,7 +97,7 @@ } /** - * @param boolean $fromId + * @param int $fromId */ public function setFromId( $fromId ) { $this->fromId = $fromId; @@ -126,7 +124,7 @@ public function rebuildSearchKey() { $dbw = $this->table->getWriteDb(); - $rowId = $this->fromId -1; + $rowId = $this->fromId - 1; $total = 0; -- To view, visit https://gerrit.wikimedia.org/r/177193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72b8ac68f2b68a2ed2a2bf5fdfd72ab1ae2506c4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits