jenkins-bot has submitted this change and it was merged.
Change subject: Remove getParsers from DataType interface
......................................................................
Remove getParsers from DataType interface
Change-Id: I663984569c98a703eef0bda931d14af2fe868693
---
M DataTypes/includes/DataType.php
M DataTypes/tests/includes/DataTypeTest.php
2 files changed, 1 insertion(+), 33 deletions(-)
Approvals:
Tobias Gritschacher: Looks good to me, approved
jenkins-bot: Verified
diff --git a/DataTypes/includes/DataType.php b/DataTypes/includes/DataType.php
index a1bcb36..c1b0980 100644
--- a/DataTypes/includes/DataType.php
+++ b/DataTypes/includes/DataType.php
@@ -54,15 +54,6 @@
protected $dataValueType;
/**
- * The ValueParser used by this data type.
- *
- * @since 0.1
- *
- * @var ValueParser[]
- */
- protected $parsers;
-
- /**
* The ValueFormatter used by this data type.
*
* @since 0.1
@@ -88,7 +79,7 @@
*
* @param string $typeId
* @param string $dataValueType
- * @param ValueParser[] $parsers
+ * @param ValueParser[] $parsers // TODO: remove
* @param ValueFormatter[] $formatters
* @param ValueValidator[] $validators
*
@@ -105,7 +96,6 @@
$this->typeId = $typeId;
$this->dataValueType = $dataValueType;
- $this->parsers = $parsers;
$this->formatters = $formatters;
$this->validators = $validators;
}
@@ -130,19 +120,6 @@
*/
public function getDataValueType() {
return $this->dataValueType;
- }
-
- /**
- * Returns the ValueParser used by this data type.
- *
- * TODO: finish design and decide on the exact role of this and if we
do not need multiple
- *
- * @since 0.1
- *
- * @return ValueParser[]
- */
- public function getParsers() {
- return $this->parsers;
}
/**
diff --git a/DataTypes/tests/includes/DataTypeTest.php
b/DataTypes/tests/includes/DataTypeTest.php
index 07f41fc..c0c66ea 100644
--- a/DataTypes/tests/includes/DataTypeTest.php
+++ b/DataTypes/tests/includes/DataTypeTest.php
@@ -68,15 +68,6 @@
* @dataProvider instanceProvider
* @param DataType $type
*/
- public function testGetParser( DataType $type ) {
- $this->assertInternalType( 'array', $type->getParsers() );
- $this->assertContainsOnlyInstancesOf(
'ValueParsers\ValueParser', $type->getParsers() );
- }
-
- /**
- * @dataProvider instanceProvider
- * @param DataType $type
- */
public function testGetFormatter( DataType $type ) {
$this->assertInternalType( 'array', $type->getFormatters() );
$this->assertContainsOnlyInstancesOf(
'ValueFormatters\ValueFormatter', $type->getFormatters() );
--
To view, visit https://gerrit.wikimedia.org/r/61599
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I663984569c98a703eef0bda931d14af2fe868693
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Anja Jentzsch <[email protected]>
Gerrit-Reviewer: Ataherivand <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: Denny Vrandecic <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: Jens Ohlig <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: John Erling Blad <[email protected]>
Gerrit-Reviewer: Lydia Pintscher <[email protected]>
Gerrit-Reviewer: Markus Kroetzsch <[email protected]>
Gerrit-Reviewer: Nikola Smolenski <[email protected]>
Gerrit-Reviewer: Silke Meyer <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits