IGNFHeightGrid::getValues()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 5
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
/**
4
 * PHPCoord.
5
 *
6
 * @author Doug Wright
7
 */
8
declare(strict_types=1);
9
10
namespace PHPCoord\CoordinateOperation;
11
12
use PHPCoord\UnitOfMeasure\Length\Metre;
13
14
class IGNFHeightGrid extends GeographicGeoidHeightGrid
15
{
16
    use IGNFGrid;
17
18
    /**
19
     * @return Metre[]
20
     */
21
    public function getValues(float $x, float $y): array
22
    {
23
        $shift = $this->interpolate($x, $y)[0];
24
25
        return [new Metre($shift)];
26
    }
27
}
28