Code Duplication    Length = 5-5 lines in 2 locations

htdocs/lib2/logic/coordinate.class.php 2 locations

@@ 31-35 (lines=5) @@
28
    // d.ddddd°
29
    public function getDecimal()
30
    {
31
        if ($this->nLat < 0) {
32
            $sLat = 'S ' . sprintf('%08.5f', - $this->nLat) . '°';
33
        } else {
34
            $sLat = 'N ' . sprintf('%08.5f', $this->nLat) . '°';
35
        }
36
37
        if ($this->nLon < 0) {
38
            $sLon = 'W ' . sprintf('%09.5f', - $this->nLon) . '°';
@@ 37-41 (lines=5) @@
34
            $sLat = 'N ' . sprintf('%08.5f', $this->nLat) . '°';
35
        }
36
37
        if ($this->nLon < 0) {
38
            $sLon = 'W ' . sprintf('%09.5f', - $this->nLon) . '°';
39
        } else {
40
            $sLon = 'E ' . sprintf('%09.5f', $this->nLon) . '°';
41
        }
42
43
        return [
44
            'lat' => $sLat,