Completed
Push — master ( 3f79df...f352a0 )
by Bryan
03:51
created

Weather::__construct()   A

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 weather
6
 */
7
class Weather
8
{
9
    /**
10
     * Weather description.
11
     * @var string
12
     */
13
    public $description;
14
15
    /**
16
     * Weather icon.
17
     * @var string
18
     */
19
    public $icon;
20
21
    /**
22
     * Create Weather object.
23
     * @param string $description Weather description.
24
     * @param string $icon        Weather icon.
25
     */
26 1
    public function __construct(string $description, string $icon = null)
27
    {
28 1
        $this->description = $description;
29 1
        $this->icon = $icon;
30 1
    }
31
}
32