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

LatLong   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 22
ccs 5
cts 5
cp 1
rs 10

2 Methods

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