MediawikiArticleImage::getHeight()   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 2
Bugs 0 Features 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 2
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace PPP\Wikidata\Wikipedia;
4
5
class MediawikiArticleImage {
6
7
	/**
8
	 * @var string
9
	 */
10
	private $url;
11
12
	/**
13
	 * @var int
14
	 */
15
	private $width;
16
17
	/**
18
	 * @var int
19
	 */
20
	private $height;
21
22
	/**
23
	 * @var string
24
	 */
25
	private $title;
26
27
	/**
28
	 * @param string $url
29
	 * @param int $width
30
	 * @param int $height
31
	 * @param string $title
32
	 */
33 4
	public function __construct($url, $width, $height, $title) {
34 4
		$this->url = $url;
35 4
		$this->width = $width;
36 4
		$this->height = $height;
37 4
		$this->title = $title;
38 4
	}
39
40
	/**
41
	 * @return string
42
	 */
43 1
	public function getUrl() {
44 1
		return $this->url;
45
	}
46
47
	/**
48
	 * @return int
49
	 */
50 1
	public function getWidth() {
51 1
		return $this->width;
52
	}
53
54
	/**
55
	 * @return int
56
	 */
57 1
	public function getHeight() {
58 1
		return $this->height;
59
	}
60
61
	/**
62
	 * @return string
63
	 */
64 1
	public function getTitle() {
65 1
		return $this->title;
66
	}
67
}
68