Passed
Push — master ( fd93b5...48e916 )
by Doug
40:26 queued 29:39
created

GeographicGeoidHeightGrid   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHeightAdjustment() 0 3 1
1
<?php
2
/**
3
 * PHPCoord.
4
 *
5
 * @author Doug Wright
6
 */
7
declare(strict_types=1);
8
9
namespace PHPCoord\CoordinateOperation;
10
11
use PHPCoord\GeographicPoint;
12
use PHPCoord\UnitOfMeasure\Length\Length;
13
use PHPCoord\UnitOfMeasure\Length\Metre;
14
15
abstract class GeographicGeoidHeightGrid extends Grid
16
{
17
    /**
18
     * @return Metre[]
19
     */
20
    abstract public function getValues(float $x, float $y): array;
21
22 8
    public function getHeightAdjustment(GeographicPoint $location): Length
23
    {
24 8
        return $this->getValues($location->getLongitude()->asDegrees()->getValue(), $location->getLatitude()->asDegrees()->getValue())[0];
25
    }
26
}
27