jenkins-bot has submitted this change and it was merged.
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, 67 insertions(+), 53 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
diff --git a/client/includes/Changes/ChangeHandler.php
b/client/includes/Changes/ChangeHandler.php
index 57e3082..f2a205f 100644
--- a/client/includes/Changes/ChangeHandler.php
+++ b/client/includes/Changes/ChangeHandler.php
@@ -63,7 +63,7 @@
private $titleFactory;
/**
- * @var PageUpdater $updater
+ * @var PageUpdater
*/
private $updater;
@@ -293,7 +293,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 e300e7f..cdc34a0 100644
--- a/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
+++ b/client/tests/phpunit/includes/Changes/ChangeHandlerTest.php
@@ -41,7 +41,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..73deb72 100644
--- a/lib/includes/ChangeNotificationJob.php
+++ b/lib/includes/ChangeNotificationJob.php
@@ -2,6 +2,8 @@
namespace Wikibase;
+use Job;
+use Title;
use Wikibase\Client\Changes\ChangeHandler;
use Wikibase\Client\WikibaseClient;
@@ -13,10 +15,10 @@
* @licence GNU GPL v2+
* @author Daniel Kinzler
*/
-class ChangeNotificationJob extends \Job {
+class ChangeNotificationJob extends Job {
/**
- * @var Change[] $changes: initialized lazily by getChanges().
+ * @var Change[]|null Initialized lazily by getChanges.
*/
private $changes = null;
@@ -28,11 +30,11 @@
/**
* Creates a ChangeNotificationJob representing the given changes.
*
- * @param array $changes The list of changes to be processed
+ * @param Change[] $changes The list of changes to be processed
* @param string $repo The name of the repository the changes come
from (default: "").
* @param array|bool $params extra job parameters, see
Job::__construct (default: false).
*
- * @return \Wikibase\ChangeNotificationJob: the job
+ * @return ChangeNotificationJob
*/
public static function newFromChanges( array $changes, $repo = '',
$params = false ) {
static $dummyTitle = null;
@@ -41,7 +43,7 @@
// Note: we don't really care about the title and will use a
dummy
if ( $dummyTitle === null ) {
// The Job class wants a Title object for some reason.
Supply a dummy.
- $dummyTitle = \Title::newFromText(
"ChangeNotificationJob", NS_SPECIAL );
+ $dummyTitle = Title::newFromText(
"ChangeNotificationJob", NS_SPECIAL );
}
// get the list of change IDs
@@ -76,12 +78,11 @@
*
* @see Job::factory.
*
- * @param \Title $title ignored
- * @param $params array|bool
- * @param $id int
+ * @param Title $title
+ * @param array|bool $params
*/
- public function __construct( \Title $title, $params = false, $id = 0 ) {
- parent::__construct( 'ChangeNotification', $title, $params, $id
);
+ public function __construct( Title $title, $params = false ) {
+ parent::__construct( 'ChangeNotification', $title, $params );
}
/**
@@ -123,9 +124,7 @@
}
/**
- * Run the job
- *
- * @return boolean success
+ * @return bool success
*/
public function run() {
$changes = $this->getChanges();
@@ -158,4 +157,5 @@
return $this->changeHandler;
}
+
}
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: merged
Gerrit-Change-Id: I72b8ac68f2b68a2ed2a2bf5fdfd72ab1ae2506c4
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: Daniel Kinzler <[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