Test Failed
Push — issue#666 ( f5ce0d...ce3976 )
by Guilherme
28:08
created

City::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace LoginCidadao\CoreBundle\Entity;
12
13
use Doctrine\ORM\Mapping as ORM;
14
use JMS\Serializer\Annotation\Groups;
15
16
/**
17
 * City
18
 *
19
 * @ORM\Table(name="city",indexes={@ORM\Index(name="city_name_index", columns={"name"})})
20
 * @ORM\Entity(repositoryClass="LoginCidadao\CoreBundle\Entity\CityRepository")
21
 */
22
class City
23
{
24
    const REVIEWED_OK = 0;
25
    const REVIEWED_IGNORE = 1;
26
27
    /**
28
     * @var integer
29
     *
30
     * @ORM\Column(name="id", type="integer")
31
     * @ORM\Id
32
     * @Groups({"city","typeahead","public_profile"})
33
     * @ORM\GeneratedValue(strategy="AUTO")
34
     */
35
    protected $id;
36
37
    /**
38
     * @var string
39
     *
40
     * @Groups({"city","typeahead","public_profile"})
41
     * @ORM\Column(name="name", type="string", length=255)
42
     */
43
    protected $name;
44
45
    /**
46
     * @var string
47
     *
48
     * @Groups({"city"})
49
     * @ORM\Column(name="stat", type="string", length=7, nullable=true)
50
     */
51
    protected $stat;
52
53
    /**
54
     * @Groups({"city","typeahead","public_profile"})
55
     * @ORM\ManyToOne(targetEntity="LoginCidadao\CoreBundle\Entity\State", inversedBy="cities")
56
     * @ORM\JoinColumn(name="state_id", referencedColumnName="id")
57
     */
58
    protected $state;
59
60
    /**
61
     * @ORM\Column(type="integer", nullable=true)
62
     */
63
    protected $reviewed;
64
65
    /**
66
     * Get id
67
     *
68
     * @return integer
69
     */
70 1
    public function getId()
71
    {
72 1
        return $this->id;
73
    }
74
75 1
    public function setId($var)
76
    {
77 1
        $this->id = $var;
78 1
        return $this;
79
    }
80
81
    public function setName($var)
82
    {
83
        $this->name = $var;
84
85
        return $this;
86
    }
87
88
    public function getName()
89
    {
90
        return $this->name;
91
    }
92
93
    public function setStat($var)
94
    {
95
        $this->stat = $var;
96
97
        return $this;
98
    }
99
100
    public function getStat()
101
    {
102
        return $this->stat;
103
    }
104
105
    public function setReviewed($var)
106
    {
107
        $this->reviewed = $var;
108
109
        return $this;
110
    }
111
112
    public function getReviewed()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
113
    {
114
        return $this->reviewed;
115
    }
116
117 1
    public function setState($var)
118
    {
119 1
        $this->state = $var;
120 1
        return $this;
121
    }
122
123
    /**
124
     * @return State
125
     */
126 1
    public function getState()
127
    {
128 1
        return $this->state;
129
    }
130
131
132
}
133