ProjectDTO::getEmail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Copyright (c) 2017 Francois-Xavier Soubirou.
4
 *
5
 * This file is part of ci-report.
6
 *
7
 * ci-report is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * ci-report is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with ci-report. If not, see <http://www.gnu.org/licenses/>.
19
 */
20
declare(strict_types=1);
21
22
namespace App\DTO;
23
24
use JMS\Serializer\Annotation\Type;
25
use Symfony\Component\Validator\Constraints as Assert;
26
27
/**
28
 * Project data transfert object class.
29
 *
30
 * @category  ci-report app
31
 *
32
 * @author    Francois-Xavier Soubirou <[email protected]>
33
 * @copyright 2017 Francois-Xavier Soubirou
34
 * @license   http://www.gnu.org/licenses/   GPLv3
35
 *
36
 * @see      https://www.ci-report.io
37
 */
38
class ProjectDTO
39
{
40
    /**
41
     * Name of the project.
42
     *
43
     * @var string
44
     *
45
     * @Type("string")
46
     *
47
     * @Assert\NotBlank
48
     */
49
    private $name;
50
51
    /**
52
     * Tests warning limit. Integer between 0 and 100 %.
53
     *
54
     * @var int
55
     *
56
     * @Type("integer")
57
     *
58
     * @Assert\NotBlank
59
     * @Assert\Type("integer")
60
     * @Assert\Range(min=0, max=100)
61
     */
62
    private $warning;
63
64
    /**
65
     * Tests success limit. Integer between 0 and 100 %.
66
     *
67
     * @var int
68
     *
69
     * @Type("integer")
70
     *
71
     * @Assert\NotBlank
72
     * @Assert\Type("integer")
73
     * @Assert\Range(min=0, max=100)
74
     */
75
    private $success;
76
77
    /**
78
     * Email.
79
     *
80
     * @var string
81
     *
82
     * @Type("string")
83
     *
84
     * @Assert\NotBlank
85
     * @Assert\Email(mode="strict")
86
     */
87
    private $email;
88
89
    /**
90
     * Set name.
91
     *
92
     * @param string $name
93
     *
94
     * @return ProjectDTO
95
     */
96
    public function setName(string $name): self
97
    {
98
        $this->name = $name;
99
100
        return $this;
101
    }
102
103
    /**
104
     * Get name.
105
     *
106
     * @return string
107
     */
108
    public function getName(): string
109
    {
110
        return $this->name;
111
    }
112
113
    /**
114
     * Set warning limit.
115
     *
116
     * @param int $warning
117
     *
118
     * @return ProjectDTO
119
     */
120
    public function setWarning(int $warning): self
121
    {
122
        $this->warning = $warning;
123
124
        return $this;
125
    }
126
127
    /**
128
     * Get warning limit.
129
     *
130
     * @return int
131
     */
132
    public function getWarning(): int
133
    {
134
        return $this->warning;
135
    }
136
137
    /**
138
     * Set success limit.
139
     *
140
     * @param int $success
141
     *
142
     * @return ProjectDTO
143
     */
144
    public function setSuccess(int $success): self
145
    {
146
        $this->success = $success;
147
148
        return $this;
149
    }
150
151
    /**
152
     * Get success limit.
153
     *
154
     * @return int
155
     */
156
    public function getSuccess(): int
157
    {
158
        return $this->success;
159
    }
160
161
    /**
162
     * Set email.
163
     *
164
     * @param string $email
165
     *
166
     * @return ProjectDTO
167
     */
168
    public function setEmail(string $email): self
169
    {
170
        $this->email = $email;
171
172
        return $this;
173
    }
174
175
    /**
176
     * Get email.
177
     *
178
     * @return string
179
     */
180
    public function getEmail(): string
181
    {
182
        return $this->email;
183
    }
184
}
185