Passed
Push — master ( 1c87d2...a64886 )
by Doug
04:35
created

CoordinateSystem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 12
c 1
b 0
f 0
dl 0
loc 38
ccs 6
cts 8
cp 0.75
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSRID() 0 3 1
A __construct() 0 6 1
A getAxes() 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
abstract class CoordinateSystem
12
{
13
    public const CS_TYPE_CARTESIAN = 'Cartesian';
14
15
    public const CS_TYPE_ELLIPSOIDAL = 'ellipsoidal';
16
17
    public const CS_TYPE_ORDINAL = 'ordinal';
18
19
    public const CS_TYPE_SPHERICAL = 'spherical';
20
21
    public const CS_TYPE_VERTICAL = 'vertical';
22
23
    protected string $srid;
24
25
    /**
26
     * @var Axis[]
27
     */
28
    protected array $axes;
29
30 216
    public function __construct(
31
        string $srid,
32
        array $axes
33
    ) {
34 216
        $this->srid = $srid;
35 216
        $this->axes = $axes;
36 216
    }
37
38
    public function getSRID(): string
39
    {
40
        return $this->srid;
41
    }
42
43
    /**
44
     * @return Axis[]
45
     */
46 216
    public function getAxes(): array
47
    {
48 216
        return $this->axes;
49
    }
50
}
51