Completed
Push — master ( 265af4...dd9ba2 )
by Carsten
02:36 queued 11s
created

GeoData   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 39
ccs 6
cts 12
cp 0.5
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setLatitude() 0 5 1
A setLongitude() 0 5 1
A getGeoData() 0 4 1
1
<?php
2
namespace Germania\GeoData;
3
4
class GeoData extends GeoDataAbstract implements GeoDataInterface, GeoDataProviderInterface
5
{
6
7
8
    /**
9
     * @param float $latitude
10
     * @param float $longitude
11
     */
12 4
    public function __construct( ?float $latitude = null, ?float $longitude = null)
13
    {
14 4
        $this->latitude  = $latitude;
15 4
        $this->longitude = $longitude;
16 4
    }
17
18
19
    public function setLatitude( ?float $latitude = null) : self
20
    {
21
        $this->latitude = $latitude;
22
        return $this;
23
    }
24
25
26
    public function setLongitude( ?float $longitude = null) : self
27
    {
28
        $this->longitude = $longitude;
29
        return $this;
30
    }
31
32
33
    /**
34
     * @inheritDoc
35
     * @return self
36
     */
37 4
    public function getGeoData() : ?GeoDataInterface
38
    {
39 4
        return $this;
40
    }
41
42
}
43