Completed
Push — master ( 81538e...c2bf57 )
by Jeroen De
10:06
created

GeoJsonContentHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 15
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getContentClass() 0 3 1
A makeEmptyContent() 0 3 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace Maps\GeoJsonPages;
6
7
use Maps\GeoJsonPages\GeoJsonContent;
8
9
class GeoJsonContentHandler extends \JsonContentHandler {
10
11
	public function __construct( $modelId = GeoJsonContent::CONTENT_MODEL_ID ) {
12
		parent::__construct( $modelId );
13
	}
14
15
	protected function getContentClass() {
16
		return GeoJsonContent::class;
17
	}
18
19
	public function makeEmptyContent() {
20
		return new GeoJsonContent( GeoJsonContent::newEmptyContentString() );
21
	}
22
23
}
24