Passed
Push — master ( 705a37...2b8bad )
by Doug
17:25 queued 45s
created

Axis   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Test Coverage

Coverage 69.23%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 26
c 1
b 0
f 0
dl 0
loc 66
ccs 9
cts 13
cp 0.6923
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getUnitOfMeasureId() 0 3 1
A __construct() 0 10 1
A getName() 0 3 1
A getOrientation() 0 3 1
A getAbbreviation() 0 3 1
1
<?php
2
/**
3
 * PHPCoord.
4
 *
5
 * @author Doug Wright
6
 */
7
declare(strict_types=1);
8
9
namespace PHPCoord\CoordinateSystem;
10
11
class Axis
12
{
13
    public const DEPTH = 'Depth';
14
15
    public const EASTING = 'Easting';
16
17
    public const ELLIPSOIDAL_HEIGHT = 'Ellipsoidal height';
18
19
    public const GEOCENTRIC_X = 'Geocentric X';
20
21
    public const GEOCENTRIC_Y = 'Geocentric Y';
22
23
    public const GEOCENTRIC_Z = 'Geocentric Z';
24
25
    public const GEODETIC_LATITUDE = 'Geodetic latitude';
26
27
    public const GEODETIC_LONGITUDE = 'Geodetic longitude';
28
29
    public const GRAVITY_RELATED_HEIGHT = 'Gravity-related height';
30
31
    public const LOCAL_DEPTH = 'Local depth';
32
33
    public const NORTHING = 'Northing';
34
35
    public const SOUTHING = 'Southing';
36
37
    public const WESTING = 'Westing';
38
39
    private string $orientation;
40
41
    private string $abbreviation;
42
43
    private string $name;
44
45
    private string $unitOfMeasureId;
46
47 189
    public function __construct(
48
        string $orientation,
49
        string $abbreviation,
50
        string $name,
51
        string $unitOfMeasureId
52
    ) {
53 189
        $this->orientation = $orientation;
54 189
        $this->abbreviation = $abbreviation;
55 189
        $this->name = $name;
56 189
        $this->unitOfMeasureId = $unitOfMeasureId;
57
    }
58
59
    public function getOrientation(): string
60
    {
61
        return $this->orientation;
62
    }
63
64
    public function getAbbreviation(): string
65
    {
66
        return $this->abbreviation;
67
    }
68
69 378
    public function getName(): string
70
    {
71 378
        return $this->name;
72
    }
73
74 2206
    public function getUnitOfMeasureId(): string
75
    {
76 2206
        return $this->unitOfMeasureId;
77
    }
78
}
79