Completed
Push — SemanticGeoJson ( e5361a...e30e84 )
by Jeroen De
03:54
created

SubObjectBuilder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 35.7%

Importance

Changes 0
Metric Value
dl 0
loc 33
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1
ccs 5
cts 14
cp 0.357
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getSubObjectsFromGeoJson() 0 3 1
A pointToSubobject() 0 15 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace Maps\DataAccess\GeoJsonStore;
6
7
use Title;
8
9
class SubObjectBuilder {
10
11
	private $subjectPage;
12
13 5
	public function __construct( Title $subjectPage ) {
14 5
		$this->subjectPage = $subjectPage;
15 5
	}
16
17
	/**
18
	 * @return SubObject[]
19
	 */
20 5
	public function getSubObjectsFromGeoJson( string $geoJson ) {
0 ignored issues
show
Unused Code introduced by
The parameter $geoJson is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21 5
		return [  ];
22
	}
23
24
	private function pointToSubobject(): SubObject {
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
25
		$subObject = new SubObject( 'MySubobjectName' );
26
27
		$subObject->addPropertyValuePair(
28
			'HasNumber',
29
			new \SMWDINumber( 455 )
30
		);
31
32
		$subObject->addPropertyValuePair(
33
			'HasNumber',
34
			new \SMWDINumber( 4555 )
35
		);
36
37
		return $subObject;
38
	}
39
40
41
}
42