Page   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 49
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getId() 0 3 1
A getTitle() 0 3 1
A getNamespace() 0 3 1
A getRevision() 0 3 1
1
<?php
2
3
namespace Queryr\DumpReader;
4
5
/**
6
 * @licence GNU GPL v2+
7
 * @author Jeroen De Dauw < [email protected] >
8
 */
9
class Page {
10
11
	private $id;
12
	private $title;
13
	private $namespace;
14
	private $revision;
15
16
	/**
17
	 * @param string|int $id
18
	 * @param string $title
19
	 * @param string|int $namespace
20
	 * @param Revision $revision
21
	 */
22
	public function __construct( $id, $title, $namespace, Revision $revision ) {
23
		$this->id = (int)$id;
24
		$this->title = $title;
25
		$this->namespace = (int)$namespace;
26
		$this->revision = $revision;
27
	}
28
29
	/**
30
	 * @return int
31
	 */
32
	public function getId() {
33
		return $this->id;
34
	}
35
36
	/**
37
	 * @return string
38
	 */
39
	public function getTitle() {
40
		return $this->title;
41
	}
42
43
	/**
44
	 * @return int
45
	 */
46
	public function getNamespace() {
47
		return $this->namespace;
48
	}
49
50
	/**
51
	 * @return Revision
52
	 */
53
	public function getRevision() {
54
		return $this->revision;
55
	}
56
57
}
58