Completed
Pull Request — 3.1 (#348)
by Piotr
07:35
created

Subscriber::setEmail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FSi\FixturesBundle\Entity;
6
7
use DateTimeInterface;
8
use Doctrine\ORM\Mapping as ORM;
9
use Symfony\Component\Validator\Constraints as Assert;
10
11
/**
12
 * @ORM\Entity
13
 * @ORM\Table(name="subscriber")
14
 */
15
class Subscriber
16
{
17
    /**
18
     * @ORM\Column(type="integer")
19
     * @ORM\Id
20
     * @ORM\GeneratedValue(strategy="AUTO")
21
     */
22
    protected $id;
23
24
    /**
25
     * @Assert\Email()
26
     * @ORM\Column(type="string", length=100)
27
     */
28
    protected $email;
29
30
    /**
31
     * @ORM\Column(type="boolean")
32
     */
33
    protected $active = false;
34
35
    /**
36
     * @ORM\Column(type="datetime", name="created_at")
37
     */
38
    protected $createdAt;
39
40
    public function getId(): ?int
41
    {
42
        return $this->id;
43
    }
44
45
    public function setCreatedAt(?DateTimeInterface $createdAt): void
46
    {
47
        $this->createdAt = $createdAt;
48
    }
49
50
    public function getCreatedAt(): ?DateTimeInterface
51
    {
52
        return $this->createdAt;
53
    }
54
55
    public function setEmail(?string $email): void
56
    {
57
        $this->email = $email;
58
    }
59
60
    public function getEmail(): ?string
61
    {
62
        return $this->email;
63
    }
64
65
    public function setActive(bool $active): void
66
    {
67
        $this->active = $active;
68
    }
69
70
    public function isActive(): bool
71
    {
72
        return $this->active;
73
    }
74
}
75