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

GeoData::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

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