ClaimQuery::getPropertyId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
nc 1
cc 1
eloc 2
nop 0
crap 1
1
<?php
2
3
namespace WikidataQueryApi\Query;
4
5
use Wikibase\DataModel\Entity\ItemId;
6
use Wikibase\DataModel\Entity\PropertyId;
7
8
/**
9
 * @licence GPLv2+
10
 * @author Thomas Pellissier Tanon
11
 */
12
class ClaimQuery extends AbstractQuery {
13
14
	/**
15
	 * @var PropertyId
16
	 */
17
	private $propertyId;
18
19
	/**
20
	 * @var ItemId|null
21
	 */
22
	private $itemId;
23
24
	/**
25
	 * @param PropertyId $propertyId
26
	 * @param ItemId|null $itemId
27
	 */
28 3
	public function __construct( PropertyId $propertyId, ItemId $itemId = null ) {
29 3
		$this->propertyId = $propertyId;
30 3
		$this->itemId = $itemId;
31 3
	}
32
33
	/**
34
	 * @return PropertyId
35
	 */
36 1
	public function getPropertyId() {
37 1
		return $this->propertyId;
38
	}
39
40
	/**
41
	 * @return ItemId|null
42
	 */
43 1
	public function getItemId() {
44 1
		return $this->itemId;
45
	}
46
47
	/**
48
	 * @see AbstractQuery::getType
49
	 */
50 1
	public function getType() {
51 1
		return 'claim';
52
	}
53
}
54