Completed
Pull Request — master (#8)
by
unknown
08:15
created

User::setEmail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace HelloWordPl\SimpleEntityGeneratorBundle\Tests\Lib\Dummies;
4
5
/**
6
 * User dummy class for StructureResolver tests
7
 */
8
class User implements \HelloWordPl\SimpleEntityGeneratorBundle\Tests\Lib\Dummies\UserInterface
9
{
10
11
    /**
12
     * 'full_name' property
13
     * @\Symfony\Component\Validator\Constraints\NotBlank()
14
     * @\JMS\Serializer\Annotation\Type("string")
15
     * @\JMS\Serializer\Annotation\SerializedName("full_name")
16
     * @var string
17
     */
18
    private $fullName;
19
20
    /**
21
     * 'email' property
22
     * @\Symfony\Component\Validator\Constraints\Email(message = "Invalid email!")
23
     * @\JMS\Serializer\Annotation\Type("string")
24
     * @\JMS\Serializer\Annotation\SerializedName("email")
25
     * @var string
26
     */
27
    private $email;
28
29
    /**
30
     * Wether user active
31
     * @\Symfony\Component\Validator\Constraints\Type(type='boolean')
32
     * @\Symfony\Component\Validator\Constraints\IsTrue()
33
     * @\JMS\Serializer\Annotation\Type("boolean")
34
     * @\JMS\Serializer\Annotation\SerializedName("active")
35
     * @var boolean
36
     */
37
    private $active;
38
39
    /**
40
     * User new posts
41
     * @\Symfony\Component\Validator\Constraints\NotNull()
42
     * @\Symfony\Component\Validator\Constraints\Valid()
43
     * @\JMS\Serializer\Annotation\Type("Doctrine\Common\Collections\ArrayCollection<AppBundle\Entity\Post>")
44
     * @\JMS\Serializer\Annotation\SerializedName("new_posts")
45
     * @var \Doctrine\Common\Collections\ArrayCollection
46
     */
47
    private $newPosts;
48
49
    /**
50
     * Constructor.
51
     */
52
    public function __construct()
53
    {
54
        $this->newPosts = new \Doctrine\Common\Collections\ArrayCollection();
55
    }
56
57
    /**
58
     * For property "fullName"
59
     * @param string $fullName
60
     * @return $this
61
     */
62
    public function setFullName($fullName)
63
    {
64
        $this->fullName = $fullName;
65
        return $this;
66
    }
67
68
    /**
69
     * For property "fullName"
70
     * @return string
71
     */
72
    public function getFullName()
73
    {
74
        return $this->fullName;
75
    }
76
77
    /**
78
     * For property "email"
79
     * @param string $email
80
     * @return $this
81
     */
82
    public function setEmail($email)
83
    {
84
        $this->email = $email;
85
        return $this;
86
    }
87
88
    /**
89
     * For property "email"
90
     * @return string
91
     */
92
    public function getEmail()
93
    {
94
        return $this->email;
95
    }
96
97
    /**
98
     * For property "active"
99
     * @return boolean
100
     */
101
    public function isActive()
102
    {
103
        return (bool) $this->active;
104
    }
105
106
    /**
107
     * For property "active"
108
     * @param boolean $active
109
     * @return $this
110
     */
111
    public function setActive($active)
112
    {
113
        $this->active = $active;
114
        return $this;
115
    }
116
117
    /**
118
     * For property "active"
119
     * @return boolean
120
     */
121
    public function getActive()
122
    {
123
        return $this->active;
124
    }
125
126
    /**
127
     * For property "newPosts"
128
     * @param \Doctrine\Common\Collections\ArrayCollection $newPosts
129
     * @return $this
130
     */
131
    public function setNewPosts(\Doctrine\Common\Collections\ArrayCollection $newPosts)
132
    {
133
        $this->newPosts = $newPosts;
134
        return $this;
135
    }
136
137
    /**
138
     * For property "newPosts"
139
     * @return \Doctrine\Common\Collections\ArrayCollection
140
     */
141
    public function getNewPosts()
142
    {
143
        return $this->newPosts;
144
    }
145
146
}
147