Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
15 | 12 | public function setGeoData( $geodata ) |
|
16 | { |
||
17 | 12 | if ($geodata instanceOf GeoDataInterface): |
|
18 | 2 | $this->geodata = $geodata; |
|
19 | 10 | elseif ($geodata instanceOf GeoDataProviderInterface): |
|
20 | 2 | $this->geodata = $geodata->getGeoData(); |
|
21 | else: |
||
22 | 8 | throw new \InvalidArgumentException("GeoDataInterface or GeoDataProviderInterface expected"); |
|
23 | endif; |
||
24 | |||
25 | 4 | return $this; |
|
26 | } |
||
27 | |||
29 |