Completed
Push — master ( ec296f...8615b5 )
by Bobby
06:20
created

LatLong::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Ballen\Cartographer\Core;
4
5
/**
6
 * Description of LatLng
7
 *
8
 * @author ballen
9
 */
10
class LatLong extends \Ballen\Distical\Entities\LatLong
11
{
12
13
    /**
14
     * Create a new latitude and longitude object.
15
     * @param double $lat The latitude co-ordinate.
16
     * @param double $lng The longitude co-ordinate.
17
     */
18 28
    public function __construct($lat, $lng)
19
    {
20 28
        parent::__construct($lat, $lng);
21 28
    }
22
23
    /**
24
     * Returns a GeoJSON compatible LatLng array in the reversed format.
25
     * @return array
26
     */
27 22
    public function lngLatArray()
28
    {
29 22
        return [$this->lng(), $this->lat()];
30
    }
31
}
32