Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/80231
Change subject: Some cleanup in ReferencedUrlFinder related code ...................................................................... Some cleanup in ReferencedUrlFinder related code Change-Id: Ic2209c4f0c1f6edff49dcc89670930be978ff867 --- M lib/includes/EntityRetrievingDataTypeLookup.php M lib/includes/InMemoryDataTypeLookup.php M lib/includes/PropertyDataTypeLookup.php M lib/includes/PropertyInfoDataTypeLookup.php M lib/tests/phpunit/ReferencedUrlFinderTest.php 5 files changed, 14 insertions(+), 86 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/31/80231/1 diff --git a/lib/includes/EntityRetrievingDataTypeLookup.php b/lib/includes/EntityRetrievingDataTypeLookup.php index 36c7843..0a3215e 100644 --- a/lib/includes/EntityRetrievingDataTypeLookup.php +++ b/lib/includes/EntityRetrievingDataTypeLookup.php @@ -11,21 +11,6 @@ * PropertyDataTypeLookup that uses an EntityLookup to find * a property's data type ID. * - * 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.4 * * @file diff --git a/lib/includes/InMemoryDataTypeLookup.php b/lib/includes/InMemoryDataTypeLookup.php index 1ca08d8..0ae1eb9 100644 --- a/lib/includes/InMemoryDataTypeLookup.php +++ b/lib/includes/InMemoryDataTypeLookup.php @@ -11,21 +11,6 @@ * If the information is not set when requested an exception is thrown. * This class can be used as a mock in tests. * - * 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.4 * * @file @@ -45,6 +30,7 @@ * @param EntityId $propertyId * * @return string + * @throws PropertyNotFoundException */ public function getDataTypeIdForProperty( EntityId $propertyId ) { $this->verifyIdIsOfAProperty( $propertyId ); diff --git a/lib/includes/PropertyDataTypeLookup.php b/lib/includes/PropertyDataTypeLookup.php index 0273ad6..7575a6d 100644 --- a/lib/includes/PropertyDataTypeLookup.php +++ b/lib/includes/PropertyDataTypeLookup.php @@ -8,21 +8,6 @@ * Interface for objects that can find the if of the DataType * for the Property of which the id is given. * - * 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.4 * * @file diff --git a/lib/includes/PropertyInfoDataTypeLookup.php b/lib/includes/PropertyInfoDataTypeLookup.php index 8f8ab24..eeb10f5 100644 --- a/lib/includes/PropertyInfoDataTypeLookup.php +++ b/lib/includes/PropertyInfoDataTypeLookup.php @@ -12,21 +12,6 @@ * PropertyDataTypeLookup that uses an PropertyInfoStore to find * a property's data type ID. * - * 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.4 * * @file @@ -48,7 +33,7 @@ private $infoStore; /** - * @param PropertyInfoStore $infoStore + * @param PropertyInfoStore $infoStore * @param PropertyDataTypeLookup $fallbackLookup */ public function __construct( PropertyInfoStore $infoStore, PropertyDataTypeLookup $fallbackLookup = null ) { @@ -62,6 +47,7 @@ * @param EntityId $propertyId * * @return string + * @throws PropertyNotFoundException */ public function getDataTypeIdForProperty( EntityId $propertyId ) { $dataTypeId = null; diff --git a/lib/tests/phpunit/ReferencedUrlFinderTest.php b/lib/tests/phpunit/ReferencedUrlFinderTest.php index d554d60..f87899e 100644 --- a/lib/tests/phpunit/ReferencedUrlFinderTest.php +++ b/lib/tests/phpunit/ReferencedUrlFinderTest.php @@ -1,38 +1,24 @@ <?php namespace Wikibase\Lib\Test; + use DataTypes\DataTypeFactory; +use DataValues\StringValue; use Exception; -use Wikibase\Lib\InMemoryDataTypeLookup; -use Wikibase\ReferencedUrlFinder; use Wikibase\Claim; -use Wikibase\Snak; +use Wikibase\EntityId; +use Wikibase\Item; +use Wikibase\Lib\InMemoryDataTypeLookup; +use Wikibase\LibRegistry; +use Wikibase\Property; use Wikibase\PropertyNoValueSnak; use Wikibase\PropertySomeValueSnak; use Wikibase\PropertyValueSnak; -use Wikibase\EntityId; -use Wikibase\Property; -use Wikibase\Item; -use DataValues\StringValue; -use Wikibase\LibRegistry; +use Wikibase\ReferencedUrlFinder; +use Wikibase\Snak; /** - * Tests for the Wikibase\ReferencedUrlFinder class. - * - * 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 + * @covers Wikibase\ReferencedUrlFinder * * @file * @since 0.4 @@ -82,7 +68,7 @@ /** * @dataProvider snaksProvider * - * @param Snak[] $snaks + * @param Snak[] $snaks * @param EntityId[] $expected */ public function testFindSnakLinks( array $snaks, array $expected ) { -- To view, visit https://gerrit.wikimedia.org/r/80231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2209c4f0c1f6edff49dcc89670930be978ff867 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
