Passed
Push — master ( e44489...51d43e )
by Bobby
09:09
created

LatLong::lngLatArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
namespace Ballen\Cartographer\Core;
3
4
/**
5
 * Cartographer
6
 *
7
 * Cartographer is a PHP library providing the ability to programmatically
8
 * generate GeoJSON objects.
9
 *
10
 * @author Bobby Allen <[email protected]>
11
 * @license http://www.gnu.org/licenses/gpl-3.0.html
12
 * @link https://github.com/allebb/cartographer
13
 * @link http://bobbyallen.me
14
 *
15
 */
16
class LatLong extends \Ballen\Distical\Entities\LatLong
17
{
18
19
    /**
20
     * Create a new latitude and longitude object.
21
     * @param double $lat The latitude co-ordinate.
22
     * @param double $lng The longitude co-ordinate.
23
     */
24 28
    public function __construct($lat, $lng)
25
    {
26 28
        parent::__construct($lat, $lng);
27 28
    }
28
29
    /**
30
     * Returns a GeoJSON compatible LatLng array in the reversed format.
31
     * @return array
32
     */
33 22
    public function lngLatArray()
34
    {
35 22
        return [$this->lng(), $this->lat()];
36
    }
37
}
38