Completed
Pull Request — master (#97)
by lee
02:26 queued 14s
created

Uvi   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 40
rs 10
c 1
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
/**
3
 * OpenWeatherMap-PHP-API — A php api to parse weather data from http://www.OpenWeatherMap.org .
4
 *
5
 * @license MIT
6
 *
7
 * Please see the LICENSE file distributed with this source code for further
8
 * information regarding copyright and licensing.
9
 *
10
 * Please visit the following links to read about the usage policies and the license of
11
 * OpenWeatherMap before using this class:
12
 *
13
 * @see http://www.OpenWeatherMap.org
14
 * @see http://www.OpenWeatherMap.org/terms
15
 * @see http://openweathermap.org/appid
16
 */
17
18
namespace Cmfcmf\OpenWeatherMap\Util;
19
20
/**
21
 * The city class representing a city object.
22
 */
23
class Uvi
24
{
25
    /**
26
     * @var string The date time.
27
     */
28
    public $time;
29
    
30
    /**
31
     * @var float The latitude.
32
     */
33
    public $latitude;
34
35
    /**
36
     * @var float The longitude.
37
     */
38
    public $longitude;
39
40
    /**
41
     * @var float The UVI data.
42
     */
43
    public $data;
44
45
    /**
46
     * Create a new city object.
47
     *
48
     * @param string $time       The current time or time slot.
49
     * @param float  $latitude   The name of the city.
50
     * @param float  $longitude  The longitude of the city.
51
     * @param float  $data       The UVI value.
52
     *
53
     * @internal
54
     */
55
    public function __construct($time, $latitude, $longitude, $data)
56
    {
57
        $this->time = $time;
58
        $this->latitude = (float)$latitude;
59
        $this->longitude = (float)$longitude;
60
        $this->data = (float)$data;
61
    }
62
}
63