EntityPage::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 5
crap 1
1
<?php
2
3
namespace Queryr\Replicator\Model;
4
5
/**
6
 * @licence GNU GPL v2+
7
 * @author Jeroen De Dauw < [email protected] >
8
 */
9
class EntityPage {
10
11
	private $entityJson;
12
	private $title;
13
	private $namespaceId;
14
	private $revisionId;
15
	private $revisionTime;
16
17
	/**
18
	 * @param string $entityJson
19
	 * @param string $title
20
	 * @param string|int $namespaceId
21
	 * @param string|int $revisionId
22
	 * @param string $revisionTime
23
	 */
24 2
	public function __construct( string $entityJson, string $title, $namespaceId, $revisionId, string $revisionTime ) {
25 2
		$this->entityJson = $entityJson;
26 2
		$this->title = $title;
27 2
		$this->namespaceId = (int)$namespaceId;
28 2
		$this->revisionId = (int)$revisionId;
29 2
		$this->revisionTime = $revisionTime;
30 2
	}
31
32 1
	public function getEntityJson(): string {
33 1
		return $this->entityJson;
34
	}
35
36 1
	public function getTitle(): string {
37 1
		return $this->title;
38
	}
39
40
	public function getNamespaceId(): int {
41
		return $this->namespaceId;
42
	}
43
44 1
	public function getRevisionId(): int {
45 1
		return $this->revisionId;
46
	}
47
48 1
	public function getRevisionTime(): string {
49 1
		return $this->revisionTime;
50
	}
51
52
}
53