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

CoordinateSystem::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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