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

ProjectedPoint   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getCRS() 0 3 1
1
<?php
2
/**
3
 * PHPCoord.
4
 *
5
 * @author Doug Wright
6
 */
7
declare(strict_types=1);
8
9
namespace PHPCoord;
10
11
use PHPCoord\CoordinateReferenceSystem\CoordinateReferenceSystem;
12
use PHPCoord\CoordinateReferenceSystem\Projected;
13
14
/**
15
 * Coordinate representing a point on a map projection.
16
 * @author Doug Wright
17
 */
18
abstract class ProjectedPoint extends Point
19
{
20
    /**
21
     * Coordinate reference system.
22
     * @var CoordinateReferenceSystem
23
     */
24
    protected $crs;
25
26
    public function __construct(Projected $crs)
27
    {
28
        $this->crs = $crs;
29
    }
30
31
    public function getCRS(): CoordinateReferenceSystem
32
    {
33
        return $this->crs;
34
    }
35
}
36