Completed
Push — master ( 7c792b...5c54ea )
by Bryan
01:53
created

City   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 43
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 1
1
<?php
2
namespace Bhhaskin\WeatherBee\Util;
3
4
use Bhhaskin\WeatherBee\Util\Location;
5
6
/**
7
 * Class for handling city
8
 */
9
class City extends Location
10
{
11
    /**
12
     * Name of the city.
13
     * @var string
14
     */
15
    public $name;
16
17
    /**
18
     * Name of the state the city is in.
19
     * @var string
20
     */
21
    public $state;
22
23
    /**
24
     * Name of the country the city is in.
25
     * @var [type]
26
     */
27
    public $country;
28
29
    /**
30
     * Creates city object.
31
     * @param string $name    Name of the city.
32
     * @param string $state   Name of state the city is in.
33
     * @param string $country Name of the country the city is in.
34
     * @param float  $lat     Latitude of city.
35
     * @param float  $lng     Longitude of city,
36
     */
37
    function __construct(
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
38
            string $name = null,
39
            string $state = null,
40
            string $country = null,
41
            float $lat = null,
42
            float $lng = null
43
        )
44
    {
45
        $this->name = $name;
46
        $this->state = $state;
47
        $this->country = $country;
48
49
        parent::__construct($lat, $lng);
50
    }
51
}
52