Completed
Push — master ( 3a8823...81c6e7 )
by Piotr
02:46
created

Subscriber   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 93
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 93
rs 10
c 1
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setId() 0 5 1
A setCreatedAt() 0 4 1
A getCreatedAt() 0 4 1
A setEmail() 0 4 1
A getEmail() 0 4 1
A setActive() 0 5 1
A isActive() 0 4 1
1
<?php
2
3
namespace FSi\FixturesBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Component\Validator\Constraints as Assert;
7
8
/**
9
 * @ORM\Entity
10
 * @ORM\Table(name="subscriber")
11
 */
12
class Subscriber
13
{
14
    /**
15
     * @ORM\Column(type="integer")
16
     * @ORM\Id
17
     * @ORM\GeneratedValue(strategy="AUTO")
18
     */
19
    protected $id;
20
21
    /**
22
     * @Assert\Email()
23
     * @ORM\Column(type="string", length=100)
24
     */
25
    protected $email;
26
27
    /**
28
     * @ORM\Column(type="boolean")
29
     */
30
    protected $active;
31
32
    /**
33
     * @ORM\Column(type="datetime", name="created_at")
34
     */
35
    protected $createdAt;
36
37
    /**
38
     * @return mixed
39
     */
40
    public function getId()
41
    {
42
        return $this->id;
43
    }
44
45
    /**
46
     * @param mixed $id
47
     * @return Subscriber
48
     */
49
    public function setId($id)
50
    {
51
        $this->id = $id;
52
        return $this;
53
    }
54
55
    /**
56
     * @param mixed $createdAt
57
     */
58
    public function setCreatedAt($createdAt)
59
    {
60
        $this->createdAt = $createdAt;
61
    }
62
63
    /**
64
     * @return mixed
65
     */
66
    public function getCreatedAt()
67
    {
68
        return $this->createdAt;
69
    }
70
71
    /**
72
     * @param mixed $email
73
     */
74
    public function setEmail($email)
75
    {
76
        $this->email = $email;
77
    }
78
79
    /**
80
     * @return mixed
81
     */
82
    public function getEmail()
83
    {
84
        return $this->email;
85
    }
86
87
    /**
88
     * @param mixed $active
89
     * @return Subscriber
90
     */
91
    public function setActive($active)
92
    {
93
        $this->active = (boolean) $active;
94
        return $this;
95
    }
96
97
    /**
98
     * @return bool
99
     */
100
    public function isActive()
101
    {
102
        return $this->active;
103
    }
104
}