location::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
namespace Bhhaskin\WeatherBee\Util;
3
4
/**
5
 * Class for handling location
6
 */
7
class location
8
{
9
10
    /**
11
     * Latitude of location.
12
     * @var float
13
     */
14
    public $lat;
15
16
    /**
17
     * Longitude of location.
18
     * @var float
19
     */
20
    public $lng;
21
22
    /**
23
     * Creates location object.
24
     * @param float $lat Latitude of location.
25
     * @param float $lng Longitude of location.
26
     */
27 1
    public function __construct(float $lat = null, float $lng = null)
28
    {
29 1
        $this->lat = $lat;
30 1
        $this->lng = $lng;
31 1
    }
32
}
33