Location   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setLocation() 0 7 1
A getLocation() 0 4 1
A getCountry() 0 4 1
A getCity() 0 4 1
1
<?php
2
namespace Dwr\GlobalWeatherBundle\Entity;
3
4
class Location
5
{
6
    private $location;
7
    private $city;
8
    private $country;
9
10
    public function setLocation($location)
11
    {
12
        $this->location = $location;
13
        list($this->country, $this->city) = explode(',', $location);
14
15
        return $this;
16
    }
17
18
    public function getLocation()
19
    {
20
        return $this->location;
21
    }
22
23
    public function getCountry()
24
    {
25
        return trim($this->country);
26
    }
27
28
    public function getCity()
29
    {
30
        return trim($this->city);
31
    }
32
}
33