[MediaWiki-commits] [Gerrit] Move JsonDumpGenerator from lib to repo - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/113350 Change subject: Move JsonDumpGenerator from lib to repo .. Move JsonDumpGenerator from lib to repo Change-Id: I428cde001a0934beeaa231b0315443dfd3f947de --- R repo/includes/Dumpers/JsonDumpGenerator.php R repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php 2 files changed, 13 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/50/113350/1 diff --git a/lib/includes/Dumpers/JsonDumpGenerator.php b/repo/includes/Dumpers/JsonDumpGenerator.php similarity index 90% rename from lib/includes/Dumpers/JsonDumpGenerator.php rename to repo/includes/Dumpers/JsonDumpGenerator.php index 8fc6539..8c50232 100644 --- a/lib/includes/Dumpers/JsonDumpGenerator.php +++ b/repo/includes/Dumpers/JsonDumpGenerator.php @@ -3,6 +3,7 @@ namespace Wikibase\Dumpers; use ExceptionHandler; +use InvalidArgumentException; use MessageReporter; use MWException; use NullMessageReporter; @@ -75,14 +76,14 @@ /** * @param resource $out -* @param \Wikibase\EntityLookup $lookup +* @param EntityLookup $lookup * @param Serializer $entitySerializer * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function __construct( $out, EntityLookup $lookup, Serializer $entitySerializer ) { if ( !is_resource( $out ) ) { - throw new \InvalidArgumentException( '$out must be a file handle!' ); + throw new InvalidArgumentException( '$out must be a file handle!' ); } $this->out = $out; @@ -126,14 +127,14 @@ } /** -* @param \ExceptionHandler $exceptionHandler +* @param ExceptionHandler $exceptionHandler */ public function setExceptionHandler( ExceptionHandler $exceptionHandler ) { $this->exceptionHandler = $exceptionHandler; } /** -* @return \ExceptionHandler +* @return ExceptionHandler */ public function getExceptionHandler() { return $this->exceptionHandler; @@ -148,19 +149,19 @@ * @param int $shardingFactor * @param int $shard * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function setShardingFilter( $shardingFactor, $shard ) { if ( !is_int( $shardingFactor ) || $shardingFactor < 1 ) { - throw new \InvalidArgumentException( '$shardingFactor must be an integer > 0' ); + throw new InvalidArgumentException( '$shardingFactor must be an integer > 0' ); } if ( !is_int( $shard ) || $shard < 0 ) { - throw new \InvalidArgumentException( '$shard must be an integer >= 0' ); + throw new InvalidArgumentException( '$shard must be an integer >= 0' ); } if ( $shard >= $shardingFactor ) { - throw new \InvalidArgumentException( '$shard must be smaller than $shardingFactor' ); + throw new InvalidArgumentException( '$shard must be smaller than $shardingFactor' ); } $this->shardingFactor = $shardingFactor; @@ -172,7 +173,7 @@ * * @param string|null $type The desired type (use null for any type). * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function setEntityTypeFilter( $type ) { $this->entityType = $type; @@ -256,7 +257,7 @@ * @param $data * * @return string -* @throws \MWException +* @throws MWException */ public function encode( $data ) { $json = json_encode( $data, $this->jsonFlags ); diff --git a/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php b/repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php similarity index 99% rename from lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php rename to repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php index 6ab4d86..c09d84a 100644 --- a/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php +++ b/repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php @@ -20,7 +20,7 @@ * @covers Wikibase\Dumpers\JsonDumpGenerator * * @group Wikibase - * @group WikibaseLib + * @group WikibaseRepo * @group JsonDump * * @license GPL 2+ -- To view, visit https://gerrit.wikimedia.org/r/113350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I428cde001a0934beeaa231b0315443dfd3f947de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-O
[MediaWiki-commits] [Gerrit] Move JsonDumpGenerator from lib to repo - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Move JsonDumpGenerator from lib to repo .. Move JsonDumpGenerator from lib to repo Change-Id: I428cde001a0934beeaa231b0315443dfd3f947de --- R repo/includes/Dumpers/JsonDumpGenerator.php R repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php 2 files changed, 13 insertions(+), 12 deletions(-) Approvals: Aude: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/lib/includes/Dumpers/JsonDumpGenerator.php b/repo/includes/Dumpers/JsonDumpGenerator.php similarity index 90% rename from lib/includes/Dumpers/JsonDumpGenerator.php rename to repo/includes/Dumpers/JsonDumpGenerator.php index 8fc6539..8c50232 100644 --- a/lib/includes/Dumpers/JsonDumpGenerator.php +++ b/repo/includes/Dumpers/JsonDumpGenerator.php @@ -3,6 +3,7 @@ namespace Wikibase\Dumpers; use ExceptionHandler; +use InvalidArgumentException; use MessageReporter; use MWException; use NullMessageReporter; @@ -75,14 +76,14 @@ /** * @param resource $out -* @param \Wikibase\EntityLookup $lookup +* @param EntityLookup $lookup * @param Serializer $entitySerializer * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function __construct( $out, EntityLookup $lookup, Serializer $entitySerializer ) { if ( !is_resource( $out ) ) { - throw new \InvalidArgumentException( '$out must be a file handle!' ); + throw new InvalidArgumentException( '$out must be a file handle!' ); } $this->out = $out; @@ -126,14 +127,14 @@ } /** -* @param \ExceptionHandler $exceptionHandler +* @param ExceptionHandler $exceptionHandler */ public function setExceptionHandler( ExceptionHandler $exceptionHandler ) { $this->exceptionHandler = $exceptionHandler; } /** -* @return \ExceptionHandler +* @return ExceptionHandler */ public function getExceptionHandler() { return $this->exceptionHandler; @@ -148,19 +149,19 @@ * @param int $shardingFactor * @param int $shard * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function setShardingFilter( $shardingFactor, $shard ) { if ( !is_int( $shardingFactor ) || $shardingFactor < 1 ) { - throw new \InvalidArgumentException( '$shardingFactor must be an integer > 0' ); + throw new InvalidArgumentException( '$shardingFactor must be an integer > 0' ); } if ( !is_int( $shard ) || $shard < 0 ) { - throw new \InvalidArgumentException( '$shard must be an integer >= 0' ); + throw new InvalidArgumentException( '$shard must be an integer >= 0' ); } if ( $shard >= $shardingFactor ) { - throw new \InvalidArgumentException( '$shard must be smaller than $shardingFactor' ); + throw new InvalidArgumentException( '$shard must be smaller than $shardingFactor' ); } $this->shardingFactor = $shardingFactor; @@ -172,7 +173,7 @@ * * @param string|null $type The desired type (use null for any type). * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function setEntityTypeFilter( $type ) { $this->entityType = $type; @@ -256,7 +257,7 @@ * @param $data * * @return string -* @throws \MWException +* @throws MWException */ public function encode( $data ) { $json = json_encode( $data, $this->jsonFlags ); diff --git a/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php b/repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php similarity index 99% rename from lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php rename to repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php index 6ab4d86..c09d84a 100644 --- a/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php +++ b/repo/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php @@ -20,7 +20,7 @@ * @covers Wikibase\Dumpers\JsonDumpGenerator * * @group Wikibase - * @group WikibaseLib + * @group WikibaseRepo * @group JsonDump * * @license GPL 2+ -- To view, visit https://gerrit.wikimedia.org/r/113350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I428cde001a0934beeaa231b0315443dfd3f947de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: A