Passed
Push — master ( 317e1d...c41446 )
by Carsten
02:32 queued 10s
created

GeoData   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 1
dl 0
loc 56
ccs 19
cts 19
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A setLatitude() 0 5 1
A setLongitude() 0 5 1
A setSource() 0 5 1
A setStatus() 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 8
    public function __construct( ?float $latitude = null, ?float $longitude = null, ?string $source = null)
13
    {
14 8
        $this->setLatitude( $latitude );
15 8
        $this->setLongitude( $longitude );
16 8
        $this->setSource( $source );
17 8
    }
18
19
20 8
    public function setLatitude( ?float $latitude = null) : self
21
    {
22 8
        $this->latitude = $latitude;
23 8
        return $this;
24
    }
25
26
27 8
    public function setLongitude( ?float $longitude = null) : self
28
    {
29 8
        $this->longitude = $longitude;
30 8
        return $this;
31
    }
32
33
34 8
    public function setSource( ?string $source = null) : self
35
    {
36 8
        $this->source = $source;
37 8
        return $this;
38
    }
39
40
41 2
    public function setStatus( ?string $status = null) : self
42
    {
43 2
        $this->status = $status;
44 2
        return $this;
45
    }
46
47
48
    /**
49
     * @inheritDoc
50
     * @return self
51
     */
52 4
    public function getGeoData() : ?GeoDataInterface
53
    {
54 4
        return $this;
55
    }
56
57
58
59
}
60