Passed
Push — 4.x ( e9b635...bc20e1 )
by Doug
07:44
created

CoordinateSystem::fromEPSGCode()   A

Complexity

Conditions 6
Paths 9

Size

Total Lines 34
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 19
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
c 1
b 0
f 0
dl 0
loc 34
ccs 19
cts 19
cp 1
rs 9.0111
cc 6
nc 9
nop 1
crap 6

1 Method

Rating   Name   Duplication   Size   Complexity  
A CoordinateSystem::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 197
    public function __construct(
31
        string $srid,
32
        array $axes
33
    ) {
34 197
        $this->srid = $srid;
35 197
        $this->axes = $axes;
36 197
    }
37
38
    public function getSRID(): string
39
    {
40
        return $this->srid;
41
    }
42
43
    /**
44
     * @return Axis[]
45
     */
46 197
    public function getAxes(): array
47
    {
48 197
        return $this->axes;
49
    }
50
}
51