Completed
Push — preview-1.19.0 ( 82d60e...56d621 )
by Guilherme
11:27 queued 05:18
created

NfgProfile::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
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 PROCERGS\LoginCidadao\NfgBundle\Entity;
12
13
use Doctrine\ORM\Mapping as ORM;
14
use JMS\Serializer\Annotation\Groups;
15
use libphonenumber\PhoneNumber;
16
17
/**
18
 * NfgProfile
19
 *
20
 * @ORM\Table(name="nfg_profile")
21
 * @ORM\Entity(repositoryClass="PROCERGS\LoginCidadao\NfgBundle\Entity\NfgProfileRepository")
22
 * @ORM\HasLifecycleCallbacks
23
 */
24
class NfgProfile
25
{
26
    /**
27
     * @ORM\Column(name="id", type="integer")
28
     * @ORM\Id
29
     * @ORM\GeneratedValue(strategy="AUTO")
30
     */
31
    protected $id;
32
33
    /**
34
     * @ORM\Column(type="string", length=255)
35
     * @Groups({"nfgprofile"})
36
     */
37
    protected $name;
38
39
    /**
40
     * @ORM\Column(type="string", length=255, unique=true)
41
     * @Groups({"nfgprofile"})
42
     */
43
    protected $cpf;
44
45
    /**
46
     * @ORM\Column(type="string", length=255)
47
     * @Groups({"nfgprofile"})
48
     */
49
    protected $email;
50
51
    /**
52
     * @ORM\Column(type="date", nullable=true)
53
     * @Groups({"nfgprofile"})
54
     */
55
    protected $birthdate;
56
57
    /**
58
     * @ORM\Column(type="string", nullable=true)
59
     * @Groups({"nfgprofile"})
60
     */
61
    protected $mobile;
62
63
    /**
64
     * @ORM\Column(name="access_lvl",type="integer")
65
     * @Groups({"nfgprofile"})
66
     */
67
    protected $accessLvl;
68
69
    /**
70
     * @ORM\Column(name="voter_reg", type="string", nullable=true)
71
     * @Groups({"nfgprofile"})
72
     */
73
    protected $voterRegistration;
74
75
    /**
76
     * @ORM\Column(name="updated_at", type="datetime")
77
     * @Groups({"nfgprofile"})
78
     */
79
    protected $updatedAt;
80
81
    /**
82
     * @ORM\Column(name="voter_reg_sit", type="integer", nullable=true)
83
     * @Groups({"nfgprofile"})
84
     */
85
    protected $voterRegistrationSit;
86
87 1
    public function getId()
88
    {
89 1
        return $this->id;
90
    }
91
92 1
    public function setId($var)
93
    {
94 1
        $this->id = $var;
95 1
        return $this;
96
    }
97
98 22
    public function setName($var)
99
    {
100 22
        $this->name = $var;
101 22
        return $this;
102
    }
103
104 19
    public function getName()
105
    {
106 19
        return $this->name;
107
    }
108
109 22
    public function setCpf($var)
110
    {
111 22
        $this->cpf = $var;
112 22
        return $this;
113
    }
114
115 15
    public function getCpf()
116
    {
117 15
        return $this->cpf;
118
    }
119
120 22
    public function setEmail($var)
121
    {
122 22
        $this->email = $var;
123 22
        return $this;
124
    }
125
126 19
    public function getEmail()
127
    {
128 19
        return $this->email;
129
    }
130
131 23
    public function setBirthdate($var)
132
    {
133 23
        $this->birthdate = $var;
134 23
        return $this;
135
    }
136
137 9
    public function getBirthdate()
138
    {
139 9
        return $this->birthdate;
140
    }
141
142 23
    public function setMobile($var)
143
    {
144 23
        $this->mobile = $var;
145 23
        return $this;
146
    }
147
148
    /**
149
     * @return PhoneNumber
150
     */
151 11
    public function getMobile()
152
    {
153 11
        return $this->mobile;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->mobile also could return the type string which is incompatible with the documented return type libphonenumber\PhoneNumber.
Loading history...
154
    }
155
156 22
    public function setAccessLvl($var)
157
    {
158 22
        $this->accessLvl = $var;
159 22
        return $this;
160
    }
161
162 1
    public function getAccessLvl()
163
    {
164 1
        return $this->accessLvl;
165
    }
166
167 22
    public function setVoterRegistration($var)
168
    {
169 22
        $this->voterRegistration = $var;
170 22
        return $this;
171
    }
172
173 5
    public function getVoterRegistration()
174
    {
175 5
        return $this->voterRegistration;
176
    }
177
178 11
    public function setVoterRegistrationSit($var)
179
    {
180 11
        $this->voterRegistrationSit = $var;
181 11
        return $this;
182
    }
183
184 8
    public function getVoterRegistrationSit()
185
    {
186 8
        return $this->voterRegistrationSit;
187
    }
188
189
    /**
190
     * @ORM\PrePersist
191
     * @ORM\PreUpdate
192
     */
193 1
    public function setUpdatedAt($updatedAt = null)
194
    {
195 1
        if ($updatedAt instanceof \DateTime) {
196 1
            $this->updatedAt = $updatedAt;
197
        } else {
198 1
            $this->updatedAt = new \DateTime('now');
199
        }
200 1
        return $this;
201
    }
202
203
    /**
204
     * @return \DateTime
205
     */
206 1
    public function getUpdatedAt()
207
    {
208 1
        return $this->updatedAt;
209
    }
210
}
211