Passed
Push — 4.x ( c37faa...bd875a )
by Doug
12:53
created

Axis   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 26
c 1
b 0
f 0
dl 0
loc 70
rs 10

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
    /** @var string */
40
    private $orientation;
41
42
    /** @var string */
43
    private $abbreviation;
44
45
    /** @var string */
46
    private $name;
47
48
    /** @var int */
49
    private $unitOfMeasureId;
50
51
    public function __construct(
52
        string $orientation,
53
        string $abbreviation,
54
        string $name,
55
        int $unitOfMeasureId
56
    ) {
57
        $this->orientation = $orientation;
58
        $this->abbreviation = $abbreviation;
59
        $this->name = $name;
60
        $this->unitOfMeasureId = $unitOfMeasureId;
61
    }
62
63
    public function getOrientation(): string
64
    {
65
        return $this->orientation;
66
    }
67
68
    public function getAbbreviation(): string
69
    {
70
        return $this->abbreviation;
71
    }
72
73
    public function getName(): string
74
    {
75
        return $this->name;
76
    }
77
78
    public function getUnitOfMeasureId(): int
79
    {
80
        return $this->unitOfMeasureId;
81
    }
82
}
83