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

StubGeocoder::geocode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
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