ItemRowInfo::setPageTitle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Queryr\EntityStore\Data;
4
5
/**
6
 * Represents the non-blob fields from a row in the items table.
7
 * Package private.
8
 *
9
 * @licence GNU GPL v2+
10
 * @author Jeroen De Dauw < [email protected] >
11
 */
12
trait ItemRowInfo {
13
14
	private $itemId;
15
	private $pageTitle;
16
	private $revisionId;
17
	private $revisionTime;
18
	private $itemType;
19
	private $enLabel;
20
	private $enWikiTitle;
21
22
	/**
23
	 * @param string|null $enLabel
24
	 * @return $this
25
	 */
26
	public function setEnglishLabel( $enLabel ) {
27
		$this->enLabel = $enLabel;
28
		return $this;
29
	}
30
31
	/**
32
	 * @param int|string $itemId
33
	 * @return $this
34
	 */
35
	public function setNumericItemId( $itemId ) {
36
		$this->itemId = (int)$itemId;
37
		return $this;
38
	}
39
40
	/**
41
	 * @param int|null $itemType
42
	 * @return $this
43
	 */
44
	public function setItemType( $itemType ) {
45
		$this->itemType = $itemType === null ? null : (int)$itemType;
46
		return $this;
47
	}
48
49
	/**
50
	 * @param string $pageTitle
51
	 * @return $this
52
	 */
53
	public function setPageTitle( $pageTitle ) {
54
		$this->pageTitle = $pageTitle;
55
		return $this;
56
	}
57
58
	/**
59
	 * @param int|string $revisionId
60
	 * @return $this
61
	 */
62
	public function setRevisionId( $revisionId ) {
63
		$this->revisionId = (int)$revisionId;
64
		return $this;
65
	}
66
67
	/**
68
	 * @param string $revisionTime
69
	 * @return $this
70
	 */
71
	public function setRevisionTime( $revisionTime ) {
72
		$this->revisionTime = $revisionTime;
73
		return $this;
74
	}
75
76
	/**
77
	 * @param string|null $enWikiTitle
78
	 * @return $this
79
	 */
80
	public function setEnglishWikipediaTitle( $enWikiTitle ) {
81
		$this->enWikiTitle = $enWikiTitle;
82
		return $this;
83
	}
84
85
	/**
86
	 * @return string|null
87
	 */
88
	public function getEnglishLabel() {
89
		return $this->enLabel;
90
	}
91
92
	/**
93
	 * @return int
94
	 */
95
	public function getNumericItemId() {
96
		return $this->itemId;
97
	}
98
99
	/**
100
	 * @return int|null
101
	 */
102
	public function getItemType() {
103
		return $this->itemType;
104
	}
105
106
	/**
107
	 * @return string
108
	 */
109
	public function getPageTitle() {
110
		return $this->pageTitle;
111
	}
112
113
	/**
114
	 * @return int
115
	 */
116
	public function getRevisionId() {
117
		return $this->revisionId;
118
	}
119
120
	/**
121
	 * @return string
122
	 */
123
	public function getRevisionTime() {
124
		return $this->revisionTime;
125
	}
126
127
	/**
128
	 * @return string|null
129
	 */
130
	public function getEnglishWikipediaTitle() {
131
		return $this->enWikiTitle;
132
	}
133
134
}
135