Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/242785
Change subject: Renames as suggested by aude in https://gerrit.wikimedia.org/r/#/c/232279/8/includes/CrossCheck/CrossCheckInteractor.php ...................................................................... Renames as suggested by aude in https://gerrit.wikimedia.org/r/#/c/232279/8/includes/CrossCheck/CrossCheckInteractor.php Change-Id: Idc9709cc4fbbf63a626acd5c8ef356c81c099e0f --- M includes/CrossCheck/CrossCheckInteractor.php M specials/SpecialCrossCheck.php M tests/phpunit/CrossCheck/CrossCheckInteractorTest.php 3 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityExternalValidation refs/changes/85/242785/1 diff --git a/includes/CrossCheck/CrossCheckInteractor.php b/includes/CrossCheck/CrossCheckInteractor.php index effbfa5..bf77f07 100644 --- a/includes/CrossCheck/CrossCheckInteractor.php +++ b/includes/CrossCheck/CrossCheckInteractor.php @@ -60,7 +60,7 @@ $entity = $this->entityLookup->getEntity( $entityId ); if ( $entity instanceof StatementListProvider ) { - return $this->crossCheckEntity( $entity->getStatements() ); + return $this->crossCheckStatementList( $entity->getStatements() ); } return null; @@ -91,7 +91,7 @@ * * @return CrossCheckResultList */ - public function crossCheckEntity( StatementList $statements ) { + public function crossCheckStatementList( StatementList $statements ) { return $this->crossChecker->crossCheckStatements( $statements, $statements ); } @@ -110,7 +110,7 @@ foreach ( $entities as $entity ) { $entityId = $entity->getId()->getSerialization(); if ( $entity instanceof StatementListProvider ) { - $results[$entityId] = $this->crossCheckEntity( $entity->getStatements() ); + $results[$entityId] = $this->crossCheckStatementList( $entity->getStatements() ); } } @@ -132,7 +132,7 @@ $entity = $this->entityLookup->getEntity( $entityId ); if ( $entity instanceof StatementListProvider ) { - return $this->crossCheckEntityWithProperties( $entity->getStatements(), $propertyIds ); + return $this->crossCheckStatementsWithProperties( $entity->getStatements(), $propertyIds ); } return null; @@ -168,7 +168,7 @@ * @return CrossCheckResultList * @throws InvalidArgumentException */ - public function crossCheckEntityWithProperties( StatementList $entityStatements, array $propertyIds ) { + public function crossCheckStatementsWithProperties( StatementList $entityStatements, array $propertyIds ) { Assert::parameterElementType( 'Wikibase\DataModel\Entity\PropertyId', $propertyIds, '$propertyIds' ); $statements = new StatementList(); @@ -198,7 +198,7 @@ foreach ( $entities as $entity ) { $entityId = $entity->getId()->getSerialization(); if ( $entity instanceof StatementListProvider ) { - $results[$entityId] = $this->crossCheckEntityWithProperties( + $results[$entityId] = $this->crossCheckStatementsWithProperties( $entity->getStatements(), $propertyIds ); diff --git a/specials/SpecialCrossCheck.php b/specials/SpecialCrossCheck.php index c13294c..b7245cd 100644 --- a/specials/SpecialCrossCheck.php +++ b/specials/SpecialCrossCheck.php @@ -178,7 +178,7 @@ return; } - $results = $this->crossCheckInteractor->crossCheckEntity( $entity->getStatements() ); + $results = $this->crossCheckInteractor->crossCheckStatementList( $entity->getStatements() ); if ($results && count($results) > 0) { $out->addHTML( diff --git a/tests/phpunit/CrossCheck/CrossCheckInteractorTest.php b/tests/phpunit/CrossCheck/CrossCheckInteractorTest.php index 662be47..c1d0094 100644 --- a/tests/phpunit/CrossCheck/CrossCheckInteractorTest.php +++ b/tests/phpunit/CrossCheck/CrossCheckInteractorTest.php @@ -179,7 +179,7 @@ * @dataProvider crossCheckEntityDataProvider */ public function testCrossCheckEntity( StatementList $statements, array $expectedResult ) { - $actualResult = $this->crossCheckInteractor->crossCheckEntity( $statements ); + $actualResult = $this->crossCheckInteractor->crossCheckStatementList( $statements ); $this->runAssertions( $expectedResult, $actualResult ); } @@ -453,7 +453,7 @@ $this->setExpectedException( $expectedException ); } - $actualResult = $this->crossCheckInteractor->crossCheckEntityWithProperties( $statements, $propertyIds ); + $actualResult = $this->crossCheckInteractor->crossCheckStatementsWithProperties( $statements, $propertyIds ); $this->runAssertions( $expectedResult, $actualResult ); } -- To view, visit https://gerrit.wikimedia.org/r/242785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc9709cc4fbbf63a626acd5c8ef356c81c099e0f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits