Completed
Push — master ( be45f4...df5ccc )
by Jeroen De
03:42
created

GeoJsonPage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 33
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMapHtml() 0 13 1
A wrapHtmlInThumbDivs() 0 15 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace Maps\Presentation;
6
7
use Html;
8
9
class GeoJsonPage {
10
11
	public function getMapHtml(): string {
12
		return $this->wrapHtmlInThumbDivs(
13
			Html::rawElement(
14
				'div',
15
				[
16
					'id' => 'GeoJsonMap',
17
					'style' => "width: 100%; height: 600px; background-color: #eeeeee; overflow: hidden;",
18
					'class' => 'maps-map maps-leaflet GeoJsonMap'
19
				],
20
				wfMessage( 'maps-loading-map' )->inContentLanguage()->escaped()
21
			)
22
		);
23
	}
24
25
	private function wrapHtmlInThumbDivs( string $html ): string {
26
		return Html::rawElement(
27
			'div',
28
			[
29
				'class' => 'thumb'
30
			],
31
			Html::rawElement(
32
				'div',
33
				[
34
					'class' => 'thumbinner'
35
				],
36
				$html
37
			)
38
		);
39
	}
40
41
}
42