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

Compound   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getVertical() 0 3 1
A getEpsgCode() 0 3 1
A getHorizontal() 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
class Compound extends CoordinateReferenceSystem
12
{
13
    /** @var CoordinateReferenceSystem */
14
    private $horizontal;
15
16
    /** @var CoordinateReferenceSystem */
17
    private $vertical;
18
19
    /**
20
     * Compound constructor.
21
     * @param DynamicGeocentric|DynamicGeographic2D|DynamicGeographic3D|Geocentric|Geographic2D|Geographic3D|Projected $horizontal
22
     * @param DynamicVertical|Vertical                                                                                 $vertical
23
     */
24
    public function __construct(
25
        int $epsgCode,
26
        CoordinateReferenceSystem $horizontal,
27
        CoordinateReferenceSystem $vertical
28
    ) {
29
        $this->epsgCode = $epsgCode;
30
        $this->horizontal = $horizontal;
31
        $this->vertical = $vertical;
32
    }
33
34
    public function getEpsgCode(): int
35
    {
36
        return $this->epsgCode;
37
    }
38
39
    public function getHorizontal(): CoordinateReferenceSystem
40
    {
41
        return $this->horizontal;
42
    }
43
44
    public function getVertical(): CoordinateReferenceSystem
45
    {
46
        return $this->vertical;
47
    }
48
}
49