Completed
Push — master ( d83f32...d4821e )
by Rémi
04:29
created

Coordinates   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 31
c 0
b 0
f 0
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A toArray() 0 7 1
1
<?php
2
3
namespace Twitter\API\REST\DTO;
4
5
use Twitter\API\REST\ApiParameters;
6
7
class Coordinates implements ApiParameters
8
{
9
    /** @var float */
10
    private $lat;
11
12
    /** @var float */
13
    private $long;
14
15
    /**
16
     * Coordinates constructor.
17
     *
18
     * @param float $lat
19
     * @param float $long
20
     */
21
    public function __construct($lat, $long)
22
    {
23
        $this->lat = $lat;
24
        $this->long = $long;
25
    }
26
27
    /**
28
     * @return array
29
     */
30
    public function toArray()
31
    {
32
        return [
33
            'lat' => $this->lat,
34
            'long' => $this->long,
35
        ];
36
    }
37
}
38