Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/84750
Change subject: Tidy up of JsonDumperCommits ...................................................................... Tidy up of JsonDumperCommits Change-Id: I59210a689abc2a62cc4a1c28ca8f1eaed037b059 --- M lib/includes/Dumpers/JsonDumpGenerator.php M lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php M lib/tests/phpunit/IO/EntrityIdReaderTest.php M lib/tests/phpunit/IO/LineReaderTest.php M repo/includes/store/EntityPerPage.php M repo/includes/store/sql/ConvertingResultWrapper.php M repo/includes/store/sql/DatabaseRowEntityIdIterator.php M repo/includes/store/sql/EntityPerPageTable.php M repo/maintenance/dumpJson.php M repo/tests/phpunit/includes/store/sql/DatabaseRowEntityIdIteratorTest.php M repo/tests/phpunit/includes/store/sql/EntityPerPageTableTest.php 11 files changed, 13 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/50/84750/1 diff --git a/lib/includes/Dumpers/JsonDumpGenerator.php b/lib/includes/Dumpers/JsonDumpGenerator.php index c697ce9..09c8439 100644 --- a/lib/includes/Dumpers/JsonDumpGenerator.php +++ b/lib/includes/Dumpers/JsonDumpGenerator.php @@ -1,6 +1,7 @@ <?php namespace Wikibase\Dumpers; + use MWException; use Traversable; use Wikibase\DataModel\Entity\EntityId; @@ -167,6 +168,7 @@ /** * @param $ex + * @throws StorageException */ private function handleStorageException( $ex ) { //TODO: optionally, log & ignore. diff --git a/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php b/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php index efe4207..c53b436 100644 --- a/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php +++ b/lib/tests/phpunit/Dumpers/JsonDumpGeneratorTest.php @@ -1,6 +1,7 @@ <?php namespace Wikibase\Test\Dumpers; + use ArrayObject; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\ItemId; @@ -16,9 +17,6 @@ * JsonDumpGeneratorTest * * @covers JsonDumpGenerator - * - * @ingroup Wikibase - * @ingroup Test * * @group Wikibase * @group WikibaseLib diff --git a/lib/tests/phpunit/IO/EntrityIdReaderTest.php b/lib/tests/phpunit/IO/EntrityIdReaderTest.php index 7c652d1..8c29567 100644 --- a/lib/tests/phpunit/IO/EntrityIdReaderTest.php +++ b/lib/tests/phpunit/IO/EntrityIdReaderTest.php @@ -1,6 +1,7 @@ <?php namespace Wikibase\Test\IO; + use PHPUnit_Framework_TestCase; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; @@ -8,9 +9,6 @@ /** * @covers Wikibase\IO\EntityIdReader - * - * @ingroup WikibaseLib - * @ingroup Test * * @group Wikibase * @group WikibaseLib diff --git a/lib/tests/phpunit/IO/LineReaderTest.php b/lib/tests/phpunit/IO/LineReaderTest.php index 51f9525..fa60211 100644 --- a/lib/tests/phpunit/IO/LineReaderTest.php +++ b/lib/tests/phpunit/IO/LineReaderTest.php @@ -1,14 +1,12 @@ <?php namespace Wikibase\Test\IO; + use PHPUnit_Framework_TestCase; use Wikibase\IO\LineReader; /** * @covers Wikibase\IO\LineReader - * - * @ingroup WikibaseLib - * @ingroup Test * * @group Wikibase * @group WikibaseLib diff --git a/repo/includes/store/EntityPerPage.php b/repo/includes/store/EntityPerPage.php index 769babe..429bbd6 100644 --- a/repo/includes/store/EntityPerPage.php +++ b/repo/includes/store/EntityPerPage.php @@ -1,30 +1,13 @@ <?php namespace Wikibase; + use Iterator; /** * Interface to a table that join wiki pages and entities. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * * @since 0.2 - * - * @file - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Thomas Pellissier Tanon diff --git a/repo/includes/store/sql/ConvertingResultWrapper.php b/repo/includes/store/sql/ConvertingResultWrapper.php index daef172..7dd8fd2 100644 --- a/repo/includes/store/sql/ConvertingResultWrapper.php +++ b/repo/includes/store/sql/ConvertingResultWrapper.php @@ -1,6 +1,7 @@ <?php namespace Wikibase; + use Iterator; use ResultWrapper; @@ -8,8 +9,6 @@ * Base class for iterators that convert each row of a database result into an appropriate object. * * @since 0.5 - * - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Daniel Kinzler diff --git a/repo/includes/store/sql/DatabaseRowEntityIdIterator.php b/repo/includes/store/sql/DatabaseRowEntityIdIterator.php index 3ac7af9..49ae2da 100644 --- a/repo/includes/store/sql/DatabaseRowEntityIdIterator.php +++ b/repo/includes/store/sql/DatabaseRowEntityIdIterator.php @@ -1,6 +1,7 @@ <?php namespace Wikibase; + use ResultWrapper; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; @@ -9,8 +10,6 @@ * Allows a database result set containing entity IDs to be iterated as EntityId objects. * * @since 0.5 - * - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Daniel Kinzler @@ -39,6 +38,7 @@ * * @param object $row An object representing the raw database row, as returned by ResultWrapper::current(). * + * @throws \RuntimeException * @return EntityId */ protected function convert( $row ) { diff --git a/repo/includes/store/sql/EntityPerPageTable.php b/repo/includes/store/sql/EntityPerPageTable.php index 3ccd501..e5cd42d 100644 --- a/repo/includes/store/sql/EntityPerPageTable.php +++ b/repo/includes/store/sql/EntityPerPageTable.php @@ -1,31 +1,14 @@ <?php namespace Wikibase; + use Iterator; /** * Represents a lookup database table that make the link between entities and pages. * Corresponds to the wb_entities_per_page table. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * * @since 0.2 - * - * @file - * @ingroup WikibaseRepo * * @licence GNU GPL v2+ * @author Thomas Pellissier Tanon diff --git a/repo/maintenance/dumpJson.php b/repo/maintenance/dumpJson.php index de5d5eb..41bb416 100644 --- a/repo/maintenance/dumpJson.php +++ b/repo/maintenance/dumpJson.php @@ -1,6 +1,7 @@ <?php namespace Wikibase; + use Disposable; use Iterator; use Maintenance; diff --git a/repo/tests/phpunit/includes/store/sql/DatabaseRowEntityIdIteratorTest.php b/repo/tests/phpunit/includes/store/sql/DatabaseRowEntityIdIteratorTest.php index 43073c7..3137130 100644 --- a/repo/tests/phpunit/includes/store/sql/DatabaseRowEntityIdIteratorTest.php +++ b/repo/tests/phpunit/includes/store/sql/DatabaseRowEntityIdIteratorTest.php @@ -17,9 +17,6 @@ * * @since 0.5 * - * @ingroup WikibaseRepoTest - * @ingroup Test - * * @group Wikibase * @group WikibaseStore * @group Database @@ -32,7 +29,7 @@ class DatabaseRowEntityIdIteratorTest extends \MediaWikiTestCase { /** - * @param EntityId[] $entityId + * @param array $entityIds * * @return string the table name */ diff --git a/repo/tests/phpunit/includes/store/sql/EntityPerPageTableTest.php b/repo/tests/phpunit/includes/store/sql/EntityPerPageTableTest.php index 0a92252..ad0ecb3 100644 --- a/repo/tests/phpunit/includes/store/sql/EntityPerPageTableTest.php +++ b/repo/tests/phpunit/includes/store/sql/EntityPerPageTableTest.php @@ -37,7 +37,7 @@ } /** - * @param EntityId[] $entityId + * @param array $entityIds * * @return EntityPerPageTable */ -- To view, visit https://gerrit.wikimedia.org/r/84750 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59210a689abc2a62cc4a1c28ca8f1eaed037b059 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits