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

Projected   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getEpsgCode() 0 3 1
A getCoordinateSystem() 0 3 1
A __construct() 0 9 1
A getBaseCRS() 0 3 1
1
<?php
2
/**
3
 * PHPCoord.
4
 *
5
 * @author Doug Wright
6
 */
7
declare(strict_types=1);
8
9
namespace PHPCoord\Coordinate\ReferenceSystem;
10
11
use PHPCoord\Coordinate\System\CoordinateSystem;
12
13
class Projected extends CoordinateReferenceSystem
14
{
15
    public function __construct(
16
        int $epsgCode,
17
        CoordinateSystem $coordinateSystem,
18
        CoordinateReferenceSystem $baseCRS
19
    ) {
20
        $this->epsgCode = $epsgCode;
21
        $this->coordinateSystem = $coordinateSystem;
22
        $this->baseCRS = $baseCRS;
23
        $this->datum = $baseCRS->getDatum();
24
    }
25
26
    public function getEpsgCode(): int
27
    {
28
        return $this->epsgCode;
29
    }
30
31
    public function getCoordinateSystem(): CoordinateSystem
32
    {
33
        return $this->coordinateSystem;
34
    }
35
36
    public function getBaseCRS(): CoordinateReferenceSystem
37
    {
38
        return $this->baseCRS;
39
    }
40
}
41