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

Coordinates::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
ccs 0
cts 4
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 2
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