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

GeoDataAbstract   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 72
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getLatitude() 0 4 1
A getLongitude() 0 4 1
A getLatLon() 0 7 1
A getSource() 0 4 1
A getStatus() 0 4 1
1
<?php
2
namespace Germania\GeoData;
3
4
abstract class GeoDataAbstract implements GeoDataInterface
5
{
6
7
8
    /**
9
     * @var float
10
     */
11
    public $latitude;
12
13
    /**
14
     * @var float
15
     */
16
    public $longitude;
17
18
    /**
19
     * @var string|null
20
     */
21
    public $source;
22
23
    /**
24
     * @var string|null
25
     */
26
    public $status;
27
28
29
    /**
30
     * @inheritDoc
31
     */
32 6
    public function getLatitude() : ?float
33
    {
34 6
        return $this->latitude;
35
    }
36
37
    /**
38
     * @inheritDoc
39
     */
40 6
    public function getLongitude() : ?float
41
    {
42 6
        return $this->longitude;
43
    }
44
45
46
    /**
47
     * @inheritDoc
48
     */
49 6
    public function getLatLon() : array
50
    {
51
        return array(
52 6
            $this->getLatitude(),
53 6
            $this->getLongitude()
54
        );
55
    }
56
57
58
    /**
59
     * @inheritDoc
60
     */
61 2
    public function getSource() : ?string
62
    {
63 2
        return $this->source;
64
    }    
65
66
67
    /**
68
     * @inheritDoc
69
     */
70 2
    public function getStatus() : ?string
71
    {
72 2
        return $this->status;
73
    }    
74
75
}
76