PropertyListElement::getPropertyId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Queryr\Resources;
4
5
use Wikibase\DataModel\Entity\PropertyId;
6
7
/**
8
 * @licence GNU GPL v2+
9
 * @author Jeroen De Dauw < [email protected] >
10
 */
11
class PropertyListElement {
12
13
	private $propertyId;
14
	private $propertyType;
15
	private $pageUrl;
16
	private $apiUrl;
17
18
	/**
19
	 * @param PropertyId $propertyId
20
	 * @param string $propertyType
21
	 * @param string $pageUrl
22
	 * @param string $apiUrl
23
	 */
24 2
	public function __construct( PropertyId $propertyId, $propertyType, $pageUrl, $apiUrl ) {
25 2
		$this->propertyId = $propertyId;
26 2
		$this->propertyType = $propertyType;
27 2
		$this->pageUrl = $pageUrl;
28 2
		$this->apiUrl = $apiUrl;
29 2
	}
30
31
	/**
32
	 * @return string
33
	 */
34 1
	public function getApiUrl() {
35 1
		return $this->apiUrl;
36
	}
37
38
	/**
39
	 * @return string
40
	 */
41 1
	public function getWikidataUrl() {
42 1
		return $this->pageUrl;
43
	}
44
45
	/**
46
	 * @return PropertyId
47
	 */
48 1
	public function getPropertyId() {
49 1
		return $this->propertyId;
50
	}
51
52
	/**
53
	 * @return string
54
	 */
55 1
	public function getPropertyType() {
56 1
		return $this->propertyType;
57
	}
58
59
}
60