MonolingualTextParser   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A stringParse() 0 3 1
1
<?php
2
3
namespace PPP\Wikidata\ValueParsers;
4
5
use DataValues\MonolingualTextValue;
6
use ValueParsers\StringValueParser;
7
use ValueParsers\ValueParser;
8
9
/**
10
 * Parse string value.
11
 *
12
 * @licence AGPLv3+
13
 * @author Thomas Pellissier Tanon
14
 */
15
class MonolingualTextParser extends StringValueParser {
16
17
	const FORMAT_NAME = 'monolingualtext';
18
19 1
	protected function stringParse($value) {
20 1
		return new MonolingualTextValue($this->getOption(ValueParser::OPT_LANG), $value);
21
	}
22
}
23