GeoJsonNewPageUi   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 23
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A addToOutput() 0 13 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace Maps\GeoJsonPages;
6
7
use Maps\Presentation\OutputFacade;
8
9
class GeoJsonNewPageUi {
10
11
	private $output;
12
13
	public function __construct( OutputFacade $output ) {
14
		$this->output = $output;
15
	}
16
17
	public function addToOutput() {
18
		$this->output->addModules( 'ext.maps.geojson.new.page' );
19
20
		$this->output->addHtml(
21
			\Html::element(
22
				'button',
23
				[
24
					'id' => 'maps-geojson-new'
25
				],
26
				wfMessage( 'maps-geo-json-create-page-button' )->inContentLanguage()->text()
27
			)
28
		);
29
	}
30
31
}
32