MediawikiArticleImage   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 63
ccs 14
cts 14
cp 1
rs 10
c 2
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getUrl() 0 3 1
A getWidth() 0 3 1
A getHeight() 0 3 1
A getTitle() 0 3 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