jenkins-bot has submitted this change and it was merged.
Change subject: Fix code smell issues/drop unused PHP code
......................................................................
Fix code smell issues/drop unused PHP code
Change-Id: I7e5a4032d5db9b244fac58f638819004aac7d61e
---
M lib/includes/formatters/WikibaseValueFormatterBuilders.php
M repo/includes/ChangeOp/ChangeOpAliases.php
M repo/includes/ChangeOp/ChangeOpDescription.php
M repo/includes/ChangeOp/ChangeOpLabel.php
M repo/includes/Interactors/ItemMergeInteractor.php
M repo/includes/ItemView.php
M repo/includes/specials/SpecialItemDisambiguation.php
M repo/includes/specials/SpecialWikibaseQueryPage.php
M repo/includes/store/sql/EntityPerPageTable.php
M repo/includes/store/sql/WikiPageEntityStore.php
M repo/maintenance/rebuildItemsPerSite.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
M
repo/tests/phpunit/includes/Localizer/ChangeOpValidationExceptionLocalizerTest.php
M repo/tests/phpunit/includes/WikibaseRepoTest.php
M repo/tests/phpunit/includes/api/MergeItemsTest.php
M repo/tests/phpunit/includes/api/SetClaimTest.php
M repo/tests/phpunit/includes/content/PropertyContentTest.php
M repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
M repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php
M repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php
M repo/tests/phpunit/includes/specials/SpecialListDatatypesTest.php
M repo/tests/phpunit/includes/specials/SpecialModifyTermTestCase.php
M repo/tests/phpunit/includes/specials/SpecialPageCopyrightViewTest.php
M repo/tests/phpunit/includes/store/WikiPageEntityRevisionLookupTest.php
M repo/tests/phpunit/includes/store/sql/SqlIdGeneratorTest.php
M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
27 files changed, 46 insertions(+), 64 deletions(-)
Approvals:
JanZerebecki: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php
b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
index 45c7098..1d88396 100644
--- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php
+++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
@@ -2,13 +2,13 @@
namespace Wikibase\Lib;
+use DataValues\Geo\Formatters\GeoCoordinateFormatter;
+use DataValues\Geo\Formatters\GlobeCoordinateFormatter;
use InvalidArgumentException;
use Language;
use RuntimeException;
use ValueFormatters\DecimalFormatter;
use ValueFormatters\FormatterOptions;
-use DataValues\Geo\Formatters\GeoCoordinateFormatter;
-use DataValues\Geo\Formatters\GlobeCoordinateFormatter;
use ValueFormatters\QuantityFormatter;
use ValueFormatters\ValueFormatter;
use Wikibase\LanguageFallbackChain;
@@ -541,7 +541,7 @@
*
* @return HtmlTimeFormatter
*/
- private static function newHtmlTimeFormatter(
+ protected static function newHtmlTimeFormatter(
FormatterOptions $options,
WikibaseValueFormatterBuilders $builders
) {
diff --git a/repo/includes/ChangeOp/ChangeOpAliases.php
b/repo/includes/ChangeOp/ChangeOpAliases.php
index f33d6c7..0e386da 100644
--- a/repo/includes/ChangeOp/ChangeOpAliases.php
+++ b/repo/includes/ChangeOp/ChangeOpAliases.php
@@ -5,7 +5,6 @@
use InvalidArgumentException;
use ValueValidators\Result;
use Wikibase\DataModel\Entity\Entity;
-use Wikibase\DataModel\Term\AliasGroup;
use Wikibase\DataModel\Term\Fingerprint;
use Wikibase\Summary;
use Wikibase\Validators\TermValidatorFactory;
diff --git a/repo/includes/ChangeOp/ChangeOpDescription.php
b/repo/includes/ChangeOp/ChangeOpDescription.php
index 945d7ee..673014a 100644
--- a/repo/includes/ChangeOp/ChangeOpDescription.php
+++ b/repo/includes/ChangeOp/ChangeOpDescription.php
@@ -6,8 +6,6 @@
use ValueValidators\Result;
use Wikibase\DataModel\Entity\Entity;
use Wikibase\DataModel\Term\Fingerprint;
-use Wikibase\DataModel\Term\Term;
-use Wikibase\DataModel\Term\TermList;
use Wikibase\Summary;
use Wikibase\Validators\TermValidatorFactory;
diff --git a/repo/includes/ChangeOp/ChangeOpLabel.php
b/repo/includes/ChangeOp/ChangeOpLabel.php
index 4db4755..f053425 100644
--- a/repo/includes/ChangeOp/ChangeOpLabel.php
+++ b/repo/includes/ChangeOp/ChangeOpLabel.php
@@ -6,7 +6,6 @@
use ValueValidators\Result;
use Wikibase\DataModel\Entity\Entity;
use Wikibase\DataModel\Term\Fingerprint;
-use Wikibase\DataModel\Term\Term;
use Wikibase\Summary;
use Wikibase\Validators\TermValidatorFactory;
diff --git a/repo/includes/Interactors/ItemMergeInteractor.php
b/repo/includes/Interactors/ItemMergeInteractor.php
index 32c98f1..d194695 100644
--- a/repo/includes/Interactors/ItemMergeInteractor.php
+++ b/repo/includes/Interactors/ItemMergeInteractor.php
@@ -2,7 +2,6 @@
namespace Wikibase\Repo\Interactors;
-use InvalidArgumentException;
use User;
use Wikibase\ChangeOp\ChangeOpException;
use Wikibase\ChangeOp\ChangeOpsMerge;
@@ -233,4 +232,5 @@
throw new ItemMergeException( $ex->getMessage(),
'failed-save', $ex );
}
}
+
}
diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php
index 76924cf..c9f8b9a 100644
--- a/repo/includes/ItemView.php
+++ b/repo/includes/ItemView.php
@@ -30,7 +30,6 @@
throw new InvalidArgumentException( '$entityRevision
must contain an Item.' );
}
- $html = '';
$html = parent::getInnerHtml( $entityRevision, $editable );
$html .= $this->claimsView->getHtml( $item->getClaims(),
'wikibase-statements' );
$html .= $this->getHtmlForSiteLinks( $item, $editable );
diff --git a/repo/includes/specials/SpecialItemDisambiguation.php
b/repo/includes/specials/SpecialItemDisambiguation.php
index 1828ed3..041567d 100644
--- a/repo/includes/specials/SpecialItemDisambiguation.php
+++ b/repo/includes/specials/SpecialItemDisambiguation.php
@@ -7,7 +7,6 @@
use ValueFormatters\FormatterOptions;
use ValueFormatters\ValueFormatter;
use Wikibase\DataModel\Entity\Item;
-use Wikibase\DataModel\Entity\ItemId;
use Wikibase\ItemDisambiguation;
use Wikibase\Lib\EntityIdHtmlLinkFormatter;
use Wikibase\Lib\Store\EntityLookup;
diff --git a/repo/includes/specials/SpecialWikibaseQueryPage.php
b/repo/includes/specials/SpecialWikibaseQueryPage.php
index 06d04de..d53361e 100644
--- a/repo/includes/specials/SpecialWikibaseQueryPage.php
+++ b/repo/includes/specials/SpecialWikibaseQueryPage.php
@@ -142,7 +142,6 @@
// No results to show, so don't bother with "showing X
of Y" etc.
// -- just let the user know and give up now
$out->addWikiMsg( 'specialpage-empty' );
- $out->addHTML( Html::closeElement( 'div' ) );
}
$this->outputResults(
diff --git a/repo/includes/store/sql/EntityPerPageTable.php
b/repo/includes/store/sql/EntityPerPageTable.php
index 5e39f01..0fbc5d6 100644
--- a/repo/includes/store/sql/EntityPerPageTable.php
+++ b/repo/includes/store/sql/EntityPerPageTable.php
@@ -10,7 +10,6 @@
use Wikibase\DataModel\Entity\Item;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\LegacyIdInterpreter;
-use Wikibase\Lib\Store\StorageException;
use Wikibase\Repo\Store\EntityPerPage;
/**
diff --git a/repo/includes/store/sql/WikiPageEntityStore.php
b/repo/includes/store/sql/WikiPageEntityStore.php
index 4b17ee6..159dbd8 100644
--- a/repo/includes/store/sql/WikiPageEntityStore.php
+++ b/repo/includes/store/sql/WikiPageEntityStore.php
@@ -19,7 +19,6 @@
use Wikibase\Lib\Store\StorageException;
use Wikibase\Repo\Content\EntityContentFactory;
use Wikibase\Repo\GenericEventDispatcher;
-use Wikibase\Repo\Store\EntityPerPage;
use WikiPage;
/**
diff --git a/repo/maintenance/rebuildItemsPerSite.php
b/repo/maintenance/rebuildItemsPerSite.php
index a4078aa..d8f49b3 100644
--- a/repo/maintenance/rebuildItemsPerSite.php
+++ b/repo/maintenance/rebuildItemsPerSite.php
@@ -6,7 +6,6 @@
use Wikibase\Lib\Reporting\ObservableMessageReporter;
use Wikibase\Lib\Store\SiteLinkTable;
use Wikibase\Repo\Store\SQL\EntityPerPageIdPager;
-use Wikibase\Repo\Store\SQL\EntityPerPageTable;
use Wikibase\Repo\Store\SQL\ItemsPerSiteBuilder;
use Wikibase\Repo\WikibaseRepo;
@@ -60,8 +59,6 @@
$builder->setReporter( $reporter );
$builder->setBatchSize( $batchSize );
-
- $useRedirectTargetColumn =
WikibaseRepo::getDefaultInstance()->getSettings()->getSetting(
'useRedirectTargetColumn' );
$entityPerPage =
WikibaseRepo::getDefaultInstance()->getStore()->newEntityPerPage();
$stream = new EntityPerPageIdPager( $entityPerPage, 'item' );
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
index 6660e35..182982f 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
@@ -268,9 +268,7 @@
$claim->setGuid( $claimGuid );
$item->addClaim( $claim );
- //NOTE: the mock validator will consider the string "INVALID"
to be invalid.
$goodSnak = new PropertyValueSnak( $p11, new StringValue(
'good' ) );
- $badSnak = new PropertyValueSnak( $p11, new StringValue(
'INVALID' ) );
$goodReference = new Reference( new SnakList( array( $goodSnak
) ) );
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
index b7791fa..f17ec61 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
@@ -27,7 +27,6 @@
use Wikibase\Lib\ClaimGuidGenerator;
use Wikibase\Lib\ClaimGuidValidator;
use Wikibase\Lib\Store\SiteLinkCache;
-use Wikibase\Lib\Store\SiteLinkLookup;
use Wikibase\Validators\CompositeFingerprintValidator;
use Wikibase\Validators\CompositeValidator;
use Wikibase\Validators\DataValueValidator;
diff --git
a/repo/tests/phpunit/includes/Localizer/ChangeOpValidationExceptionLocalizerTest.php
b/repo/tests/phpunit/includes/Localizer/ChangeOpValidationExceptionLocalizerTest.php
index d8a2cfc..e4ab7ac 100644
---
a/repo/tests/phpunit/includes/Localizer/ChangeOpValidationExceptionLocalizerTest.php
+++
b/repo/tests/phpunit/includes/Localizer/ChangeOpValidationExceptionLocalizerTest.php
@@ -9,7 +9,6 @@
use ValueValidators\Result;
use Wikibase\ChangeOp\ChangeOpValidationException;
use Wikibase\Repo\Localizer\ChangeOpValidationExceptionLocalizer;
-use Wikibase\Repo\Localizer\MessageParameterFormatter;
/**
* @covers Wikibase\Repo\Localizer\ChangeOpValidationExceptionLocalizer
diff --git a/repo/tests/phpunit/includes/WikibaseRepoTest.php
b/repo/tests/phpunit/includes/WikibaseRepoTest.php
index 773062c..3601d22 100644
--- a/repo/tests/phpunit/includes/WikibaseRepoTest.php
+++ b/repo/tests/phpunit/includes/WikibaseRepoTest.php
@@ -2,9 +2,6 @@
namespace Wikibase\Tests\Repo;
-use Wikibase\DataModel\Entity\Item;
-use Wikibase\DataModel\Snak\PropertyNoValueSnak;
-use Wikibase\DataModel\Statement\Statement;
use Wikibase\Repo\WikibaseRepo;
use Wikibase\SettingsArray;
diff --git a/repo/tests/phpunit/includes/api/MergeItemsTest.php
b/repo/tests/phpunit/includes/api/MergeItemsTest.php
index cbf045b..0732bf5 100644
--- a/repo/tests/phpunit/includes/api/MergeItemsTest.php
+++ b/repo/tests/phpunit/includes/api/MergeItemsTest.php
@@ -11,7 +11,6 @@
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\Repo\Interactors\ItemMergeInteractor;
use Wikibase\Repo\WikibaseRepo;
-use Wikibase\Test\Api\ApiModuleTestHelper;
use Wikibase\Test\EntityModificationTestHelper;
use Wikibase\Test\MockRepository;
diff --git a/repo/tests/phpunit/includes/api/SetClaimTest.php
b/repo/tests/phpunit/includes/api/SetClaimTest.php
index bdfeb4f..03d1314 100644
--- a/repo/tests/phpunit/includes/api/SetClaimTest.php
+++ b/repo/tests/phpunit/includes/api/SetClaimTest.php
@@ -437,7 +437,7 @@
$claim->setGuid( $guidGenerator->newGuid( $item->getId() ) );
$item->addClaim( $claim );
- $item = $store->saveEntity( $item, '', $GLOBALS['wgUser'],
EDIT_UPDATE )->getEntity();
+ $store->saveEntity( $item, '', $GLOBALS['wgUser'], EDIT_UPDATE
);
// try to change the main snak's property
$badProperty = Property::newFromType( 'string' );
@@ -450,7 +450,7 @@
$params = array(
'action' => 'wbsetclaim',
- 'claim' => \FormatJson::encode( $serializedBadClaim ),
+ 'claim' => FormatJson::encode( $serializedBadClaim ),
);
try {
diff --git a/repo/tests/phpunit/includes/content/PropertyContentTest.php
b/repo/tests/phpunit/includes/content/PropertyContentTest.php
index 9cf0804..9eb3453 100644
--- a/repo/tests/phpunit/includes/content/PropertyContentTest.php
+++ b/repo/tests/phpunit/includes/content/PropertyContentTest.php
@@ -4,7 +4,6 @@
use Wikibase\DataModel\Entity\EntityId;
use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\PropertyContent;
/**
* @covers Wikibase\PropertyContent
diff --git
a/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
b/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
index 9b7b7ec..1d77234 100644
---
a/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
+++
b/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
@@ -26,7 +26,6 @@
}
public function testExecute() {
-
$matchers['language'] = array(
'tag' => 'input',
'attributes' => array(
@@ -49,7 +48,7 @@
}
list( $output, ) = $this->executeSpecialPage( 'en' );
- $this->assertTrue( true, 'Calling execute with a subpage value'
); //TODO: assert output
+ $this->assertContains( 'value="en"', $output );
}
}
diff --git a/repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php
b/repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php
index 8ea8e7b..9f5c686 100644
--- a/repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialGoToLinkedPageTest.php
@@ -5,9 +5,8 @@
use FauxResponse;
use Site;
use SiteStore;
-use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\Repo\Specials\SpecialGoToLinkedPage;
use Wikibase\Lib\Store\SiteLinkLookup;
+use Wikibase\Repo\Specials\SpecialGoToLinkedPage;
/**
* @covers Wikibase\Repo\Specials\SpecialGoToLinkedPage
@@ -68,7 +67,7 @@
}
/**
- * @return SpecialItemByTitle
+ * @return SpecialGoToLinkedPage
*/
protected function newSpecialPage() {
$page = new SpecialGoToLinkedPage();
diff --git
a/repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php
b/repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php
index 6ee896e..2701fef 100644
--- a/repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialItemsWithoutSitelinksTest.php
@@ -2,6 +2,7 @@
namespace Wikibase\Test;
+use Language;
use Wikibase\Repo\Specials\SpecialItemsWithoutSitelinks;
/**
@@ -20,19 +21,30 @@
*/
class SpecialItemsWithoutSitelinksTest extends SpecialPageTestBase {
+ public function setUp() {
+ parent::setUp();
+
+ $this->setMwGlobals( array(
+ 'wgContLang' => Language::factory( 'qqx' )
+ ) );
+ }
+
protected function newSpecialPage() {
return new SpecialItemsWithoutSitelinks();
}
public function testExecute() {
- //TODO: Actually verify that the output is correct.
- // Currently this just tests that there is no fatal error,
- // and that the restriction handling is working and doesn't
- // block. That is, the default should let the user execute
- // the page.
-
+ // This also tests that there is no fatal error, that the
restriction handling is working
+ // and doesn't block. That is, the default should let the user
execute the page.
list( $output, ) = $this->executeSpecialPage( '' );
- $this->assertTrue( true, 'Calling execute without any subpage
value' );
+
+ $this->assertInternalType( 'string', $output );
+ $this->assertContains(
'wikibase-itemswithoutsitelinks-summary', $output );
+ $this->assertContains( '<div class="mw-spcontent">', $output );
+
+ // There was a bug in SpecialWikibaseQueryPage::showQuery()
adding an unnecesarry
+ // Html::closeElement( 'div' ) when the results is empty.
+ $this->assertNotContains( '</div></div>', $output );
}
}
diff --git a/repo/tests/phpunit/includes/specials/SpecialListDatatypesTest.php
b/repo/tests/phpunit/includes/specials/SpecialListDatatypesTest.php
index 1ddecef..1f44458 100644
--- a/repo/tests/phpunit/includes/specials/SpecialListDatatypesTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialListDatatypesTest.php
@@ -2,6 +2,7 @@
namespace Wikibase\Test;
+use Language;
use Wikibase\Repo\Specials\SpecialListDatatypes;
/**
@@ -17,19 +18,26 @@
*/
class SpecialListDataTypesTest extends SpecialPageTestBase {
+ public function setUp() {
+ parent::setUp();
+
+ $this->setMwGlobals( array(
+ 'wgContLang' => Language::factory( 'qqx' )
+ ) );
+ }
+
protected function newSpecialPage() {
return new SpecialListDatatypes();
}
public function testExecute() {
- //TODO: Actually verify that the output is correct.
- // Currently this just tests that there is no fatal error,
- // and that the restriction handling is working and doesn't
- // block. That is, the default should let the user execute
- // the page.
-
+ // This also tests that there is no fatal error, that the
restriction handling is working
+ // and doesn't block. That is, the default should let the user
execute the page.
list( $output, ) = $this->executeSpecialPage( '' );
- $this->assertTrue( true, 'Calling execute without any subpage
value' );
+
+ $this->assertInternalType( 'string', $output );
+ $this->assertContains( 'wikibase-listdatatypes-summary',
$output );
+ $this->assertContains( 'wikibase-listdatatypes-intro', $output
);
}
}
diff --git a/repo/tests/phpunit/includes/specials/SpecialModifyTermTestCase.php
b/repo/tests/phpunit/includes/specials/SpecialModifyTermTestCase.php
index 204f880..d7df613 100644
--- a/repo/tests/phpunit/includes/specials/SpecialModifyTermTestCase.php
+++ b/repo/tests/phpunit/includes/specials/SpecialModifyTermTestCase.php
@@ -37,12 +37,6 @@
}
public function testExecute() {
- //TODO: Actually verify that the output is correct.
- // Currently this just tests that there is no fatal error,
- // and that the restriction handling is working and doesn't
- // block. That is, the default should let the user execute
- // the page.
-
$id = $this->createNewItem();
$page = $this->newSpecialPage();
diff --git
a/repo/tests/phpunit/includes/specials/SpecialPageCopyrightViewTest.php
b/repo/tests/phpunit/includes/specials/SpecialPageCopyrightViewTest.php
index 012fc15..c3cc2b4 100644
--- a/repo/tests/phpunit/includes/specials/SpecialPageCopyrightViewTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialPageCopyrightViewTest.php
@@ -4,7 +4,6 @@
use Language;
use Message;
-use Wikibase\CopyrightMessageBuilder;
use Wikibase\Repo\Specials\SpecialPageCopyrightView;
/**
diff --git
a/repo/tests/phpunit/includes/store/WikiPageEntityRevisionLookupTest.php
b/repo/tests/phpunit/includes/store/WikiPageEntityRevisionLookupTest.php
index bce7192..d23ce9e 100644
--- a/repo/tests/phpunit/includes/store/WikiPageEntityRevisionLookupTest.php
+++ b/repo/tests/phpunit/includes/store/WikiPageEntityRevisionLookupTest.php
@@ -2,8 +2,6 @@
namespace Wikibase\Test;
-use DataValues\Deserializers\DataValueDeserializer;
-use DataValues\Serializers\DataValueSerializer;
use Wikibase\DataModel\Entity\BasicEntityIdParser;
use Wikibase\DataModel\Entity\Entity;
use Wikibase\EntityRevision;
@@ -11,9 +9,8 @@
use Wikibase\InternalSerialization\SerializerFactory;
use Wikibase\Lib\Store\EntityLookup;
use Wikibase\Lib\Store\EntityRedirect;
-use Wikibase\Repo\WikibaseRepo;
use Wikibase\Lib\Store\WikiPageEntityRevisionLookup;
-use Wikibase\Lib\Store\EntityContentDataCodec;
+use Wikibase\Repo\WikibaseRepo;
/**
* @covers Wikibase\Lib\Store\WikiPageEntityLookup
@@ -60,7 +57,6 @@
* @return EntityLookup
*/
protected function newEntityRevisionLookup( array $entityRevisions,
array $entityRedirects ) {
-
// make sure all test entities are in the database.
foreach ( $entityRevisions as $entityRev ) {
diff --git a/repo/tests/phpunit/includes/store/sql/SqlIdGeneratorTest.php
b/repo/tests/phpunit/includes/store/sql/SqlIdGeneratorTest.php
index c0fa483..adbfab2 100644
--- a/repo/tests/phpunit/includes/store/sql/SqlIdGeneratorTest.php
+++ b/repo/tests/phpunit/includes/store/sql/SqlIdGeneratorTest.php
@@ -4,7 +4,6 @@
use Wikibase\IdGenerator;
use Wikibase\Repo\WikibaseRepo;
-use Wikibase\StoreFactory;
/**
* @covers Wikibase\SqlIdGenerator
diff --git a/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
b/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
index f0a6f43..35396d4 100644
--- a/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
+++ b/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
@@ -14,7 +14,6 @@
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\Entity\Property;
use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\EntityFactory;
use Wikibase\Lib\Store\EntityRedirect;
use Wikibase\Lib\Store\EntityRevisionLookup;
use Wikibase\Lib\Store\EntityStore;
@@ -226,8 +225,7 @@
}
/* @var WikiPageEntityStore $store */
- /* @var EntityRevisionLookup $lookup */
- list( $store, $lookup ) = $this->createStoreAndLookup();
+ list( $store, ) = $this->createStoreAndLookup();
$user = $GLOBALS['wgUser'];
// register mock watcher
@@ -292,8 +290,7 @@
*/
public function testSaveRedirectFailure( EntityRedirect $redirect ) {
/* @var WikiPageEntityStore $store */
- /* @var EntityRevisionLookup $lookup */
- list( $store, $lookup ) = $this->createStoreAndLookup();
+ list( $store, ) = $this->createStoreAndLookup();
$user = $GLOBALS['wgUser'];
$this->setExpectedException(
'Wikibase\Lib\Store\StorageException' );
--
To view, visit https://gerrit.wikimedia.org/r/167816
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7e5a4032d5db9b244fac58f638819004aac7d61e
Gerrit-PatchSet: 7
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: JanZerebecki <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[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