Completed
Push — LocationParsers ( afa02e )
by Jeroen De
04:46
created

StubGeocoder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A geocode() 0 3 1
1
<?php
2
3
namespace Maps\Geocoders;
4
5
use DataValues\Geo\Values\LatLongValue;
6
7
/**
8
 * @licence GNU GPL v2+
9
 * @author Jeroen De Dauw < [email protected] >
10
 */
11
class StubGeocoder implements Geocoder {
12
13
	private $returnValue;
14
15
	public function __construct( LatLongValue $returnValue ) {
16
		$this->returnValue = $returnValue;
17
	}
18
19
	/**
20
	 * @param string $address
21
	 *
22
	 * @return LatLongValue|null
23
	 */
24
	public function geocode( $address ) {
25
		return $this->returnValue;
26
	}
27
28
}
29