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

LatLong   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A lngLatArray() 0 3 1
A __construct() 0 3 1
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