Passed
Push — develop ( 6aee1f...577144 )
by Laurent
01:44
created

Contact::getSlug()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the G.L.S.R. Apps package.
7
 *
8
 * (c) Dev-Int Création <[email protected]>.
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Administration\Infrastructure\Persistence\DoctrineOrm\Entities;
15
16
use Doctrine\ORM\Mapping as ORM;
0 ignored issues
show
Bug introduced by
The type Doctrine\ORM\Mapping was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
18
/**
19
 * @ORM\MappedSuperclass
20
 */
21
class Contact
22
{
23
    /**
24
     * @ORM\Id
25
     * @ORM\Column(type="guid", name="uuid")
26
     * @ORM\GeneratedValue(strategy="NONE")
27
     */
28
    protected string $uuid;
29
30
    /**
31
     * @ORM\Column(type="string", name="company_name", unique=true, nullable=false)
32
     */
33
    protected string $companyName;
34
35
    /**
36
     * @ORM\Column(type="string", name="address", nullable=false)
37
     */
38
    protected string $address;
39
40
    /**
41
     * @ORM\Column(type="string", length=5, name="zip_code", nullable=false)
42
     */
43
    protected string $zipCode;
44
45
    /**
46
     * @ORM\Column(type="string", name="town", nullable=false)
47
     */
48
    protected string $town;
49
50
    /**
51
     * @ORM\Column(type="string", name="country", nullable=false)
52
     */
53
    protected string $country;
54
55
    /**
56
     * @ORM\Column(type="string", length=14, name="phone", nullable=false)
57
     */
58
    protected string $phone;
59
60
    /**
61
     * @ORM\Column(type="string", length=14, name="facsimile", nullable=true)
62
     */
63
    protected string $facsimile;
64
65
    /**
66
     * @ORM\Column(type="string", name="email", nullable=false)
67
     */
68
    protected string $email;
69
70
    /**
71
     * @ORM\Column(type="string", name="contact_name", nullable=false)
72
     */
73
    protected string $contactName;
74
75
    /**
76
     * @ORM\Column(type="string", length=14, name="cellphone", nullable=false)
77
     */
78
    protected string $cellphone;
79
80
    /**
81
     * @ORM\Column(type="string", name="slug", unique=true, nullable=false)
82
     */
83
    protected string $slug;
84
85
    public function __construct(
86
        string $uuid,
87
        string $companyName,
88
        string $address,
89
        string $zipCode,
90
        string $town,
91
        string $country,
92
        string $phone,
93
        string $facsimile,
94
        string $email,
95
        string $contactName,
96
        string $cellphone,
97
        string $slug
98
    ) {
99
        $this->uuid = $uuid;
100
        $this->companyName = $companyName;
101
        $this->address = $address;
102
        $this->zipCode = $zipCode;
103
        $this->town = $town;
104
        $this->country = $country;
105
        $this->phone = $phone;
106
        $this->facsimile = $facsimile;
107
        $this->email = $email;
108
        $this->contactName = $contactName;
109
        $this->cellphone = $cellphone;
110
        $this->slug = $slug;
111
    }
112
113
    public static function create(
114
        string $uuid,
115
        string $companyName,
116
        string $address,
117
        string $zipCode,
118
        string $town,
119
        string $country,
120
        string $phone,
121
        string $facsimile,
122
        string $email,
123
        string $contactName,
124
        string $cellphone,
125
        string $slug
126
    ): self {
127
        return new self(
128
            $uuid,
129
            $companyName,
130
            $address,
131
            $zipCode,
132
            $town,
133
            $country,
134
            $phone,
135
            $facsimile,
136
            $email,
137
            $contactName,
138
            $cellphone,
139
            $slug
140
        );
141
    }
142
143
    public function getUuid(): string
144
    {
145
        return $this->uuid;
146
    }
147
148
    public function setUuid(string $uuid): self
149
    {
150
        $this->uuid = $uuid;
151
152
        return $this;
153
    }
154
155
    public function getCompanyName(): string
156
    {
157
        return $this->companyName;
158
    }
159
160
    public function setCompanyName(string $companyName): self
161
    {
162
        $this->companyName = $companyName;
163
164
        return $this;
165
    }
166
167
    public function getAddress(): string
168
    {
169
        return $this->address;
170
    }
171
172
    public function setAddress(string $address): self
173
    {
174
        $this->address = $address;
175
176
        return $this;
177
    }
178
179
    public function getZipCode(): string
180
    {
181
        return $this->zipCode;
182
    }
183
184
    public function setZipCode(string $zipCode): self
185
    {
186
        $this->zipCode = $zipCode;
187
188
        return $this;
189
    }
190
191
    public function getTown(): string
192
    {
193
        return $this->town;
194
    }
195
196
    public function setTown(string $town): self
197
    {
198
        $this->town = $town;
199
200
        return $this;
201
    }
202
203
    public function getCountry(): string
204
    {
205
        return $this->country;
206
    }
207
208
    public function setCountry(string $country): self
209
    {
210
        $this->country = $country;
211
212
        return $this;
213
    }
214
215
    public function getPhone(): string
216
    {
217
        return $this->phone;
218
    }
219
220
    public function setPhone(string $phone): self
221
    {
222
        $this->phone = $phone;
223
224
        return $this;
225
    }
226
227
    public function getFacsimile(): string
228
    {
229
        return $this->facsimile;
230
    }
231
232
    public function setFacsimile(string $facsimile): self
233
    {
234
        $this->facsimile = $facsimile;
235
236
        return $this;
237
    }
238
239
    public function getEmail(): string
240
    {
241
        return $this->email;
242
    }
243
244
    public function setEmail(string $email): self
245
    {
246
        $this->email = $email;
247
248
        return $this;
249
    }
250
251
    public function getContactName(): string
252
    {
253
        return $this->contactName;
254
    }
255
256
    public function setContactName(string $contactName): self
257
    {
258
        $this->contactName = $contactName;
259
260
        return $this;
261
    }
262
263
    public function getCellphone(): string
264
    {
265
        return $this->cellphone;
266
    }
267
268
    public function setCellphone(string $cellphone): self
269
    {
270
        $this->cellphone = $cellphone;
271
272
        return $this;
273
    }
274
275
    public function getSlug(): string
276
    {
277
        return $this->slug;
278
    }
279
280
    public function setSlug(string $slug): self
281
    {
282
        $this->slug = $slug;
283
284
        return $this;
285
    }
286
}
287