Registration::getIgnoreNotifications()   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
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Domain\Model;
13
14
use DateTime;
15
use DERHANSEN\SfEventMgt\Domain\Model\Registration\FieldValue;
16
use TYPO3\CMS\Extbase\Annotation\ORM\Cascade;
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Extbase\Annotation\ORM\Cascade 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
use TYPO3\CMS\Extbase\Annotation\ORM\Lazy;
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Extbase\Annotation\ORM\Lazy 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...
18
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Extbase\DomainObject\AbstractEntity 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...
19
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Extbase\Persistence\ObjectStorage 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...
20
21
class Registration extends AbstractEntity
22
{
23
    protected string $firstname = '';
24
    protected string $lastname = '';
25
    protected string $title = '';
26
    protected string $company = '';
27
    protected string $address = '';
28
    protected string $zip = '';
29
    protected string $city = '';
30
    protected string $country = '';
31
    protected string $phone = '';
32
    protected string $email = '';
33
    protected bool $ignoreNotifications = false;
34
    protected string $gender = '';
35
    protected ?DateTime $dateOfBirth = null;
36
    protected bool $accepttc = false;
37
    protected bool $confirmed = false;
38
    protected bool $paid = false;
39
    protected string $notes = '';
40
    protected ?Event $event = null;
41
    protected ?Registration $mainRegistration = null;
42
    protected ?DateTime $confirmationUntil = null;
43
    protected ?DateTime $registrationDate = null;
44
    protected bool $hidden = false;
45
    protected int $amountOfRegistrations = 1;
46
    protected string $language = '';
47
    protected string $captcha = '';
48
    protected ?FrontendUser $feUser = null;
49
    protected string $paymentmethod = '';
50
    protected string $paymentReference = '';
51
    protected bool $waitlist = false;
52
    protected float $price = 0.0;
53
    protected ?PriceOption $priceOption = null;
54
55
    /**
56
     * @var ObjectStorage<FieldValue>
57
     */
58
    #[Cascade(['value' => 'remove'])]
59
    #[Lazy]
60
    protected ObjectStorage $fieldValues;
61
62
    /**
63
     * Registration constructor.
64
     */
65
    public function __construct()
66
    {
67
        $this->initializeObject();
68
    }
69
70
    /**
71
     * Initialize all ObjectStorages as fetching an entity from the DB does not use the constructor
72
     */
73
    public function initializeObject(): void
74
    {
75
        $this->fieldValues = new ObjectStorage();
76
    }
77
78
    public function getFirstname(): string
79
    {
80
        return $this->firstname;
81
    }
82
83
    public function setFirstname(string $firstname): void
84
    {
85
        $this->firstname = $firstname;
86
    }
87
88
    public function getLastname(): string
89
    {
90
        return $this->lastname;
91
    }
92
93
    public function setLastname(string $lastname): void
94
    {
95
        $this->lastname = $lastname;
96
    }
97
98
    public function getTitle(): string
99
    {
100
        return $this->title;
101
    }
102
103
    public function setTitle(string $title): void
104
    {
105
        $this->title = $title;
106
    }
107
108
    public function getCompany(): string
109
    {
110
        return $this->company;
111
    }
112
113
    public function setCompany(string $company): void
114
    {
115
        $this->company = $company;
116
    }
117
118
    public function getAddress(): string
119
    {
120
        return $this->address;
121
    }
122
123
    public function setAddress(string $address): void
124
    {
125
        $this->address = $address;
126
    }
127
128
    public function getZip(): string
129
    {
130
        return $this->zip;
131
    }
132
133
    public function setZip(string $zip): void
134
    {
135
        $this->zip = $zip;
136
    }
137
138
    public function getCity(): string
139
    {
140
        return $this->city;
141
    }
142
143
    public function setCity(string $city): void
144
    {
145
        $this->city = $city;
146
    }
147
148
    public function getCountry(): string
149
    {
150
        return $this->country;
151
    }
152
153
    public function setCountry(string $country): void
154
    {
155
        $this->country = $country;
156
    }
157
158
    public function getPhone(): string
159
    {
160
        return $this->phone;
161
    }
162
163
    public function setPhone(string $phone): void
164
    {
165
        $this->phone = $phone;
166
    }
167
168
    public function getEmail(): string
169
    {
170
        return $this->email;
171
    }
172
173
    public function setEmail(string $email): void
174
    {
175
        $this->email = trim($email);
176
    }
177
178
    public function isIgnoreNotifications(): bool
179
    {
180
        return $this->ignoreNotifications;
181
    }
182
183
    public function getIgnoreNotifications(): bool
184
    {
185
        return $this->ignoreNotifications;
186
    }
187
188
    public function setIgnoreNotifications(bool $ignoreNotifications): void
189
    {
190
        $this->ignoreNotifications = $ignoreNotifications;
191
    }
192
193
    public function getGender(): string
194
    {
195
        return $this->gender;
196
    }
197
198
    public function setGender(string $gender): void
199
    {
200
        $this->gender = $gender;
201
    }
202
203
    public function setDateOfBirth(?DateTime $dateOfBirth): void
204
    {
205
        $this->dateOfBirth = $dateOfBirth;
206
    }
207
208
    public function getDateOfBirth(): ?DateTime
209
    {
210
        return $this->dateOfBirth;
211
    }
212
213
    public function getAccepttc(): bool
214
    {
215
        return $this->accepttc;
216
    }
217
218
    public function setAccepttc(bool $accepttc): void
219
    {
220
        $this->accepttc = $accepttc;
221
    }
222
223
    public function getConfirmed(): bool
224
    {
225
        return $this->confirmed;
226
    }
227
228
    public function setConfirmed(bool $confirmed): void
229
    {
230
        $this->confirmed = $confirmed;
231
    }
232
233
    public function isConfirmed(): bool
234
    {
235
        return $this->confirmed;
236
    }
237
238
    public function getPaid(): bool
239
    {
240
        return $this->paid;
241
    }
242
243
    public function setPaid(bool $paid): void
244
    {
245
        $this->paid = $paid;
246
    }
247
248
    public function isPaid(): bool
249
    {
250
        return $this->paid;
251
    }
252
253
    public function setEvent(?Event $event): void
254
    {
255
        $this->event = $event;
256
    }
257
258
    public function getEvent(): ?Event
259
    {
260
        return $this->event;
261
    }
262
263
    public function setMainRegistration(?Registration $registration): void
264
    {
265
        $this->mainRegistration = $registration;
266
    }
267
268
    public function getMainRegistration(): ?Registration
269
    {
270
        return $this->mainRegistration;
271
    }
272
273
    public function setNotes(string $notes): void
274
    {
275
        $this->notes = $notes;
276
    }
277
278
    public function getNotes(): string
279
    {
280
        return $this->notes;
281
    }
282
283
    public function setConfirmationUntil(?DateTime $confirmationUntil): void
284
    {
285
        $this->confirmationUntil = $confirmationUntil;
286
    }
287
288
    public function getConfirmationUntil(): ?DateTime
289
    {
290
        return $this->confirmationUntil;
291
    }
292
293
    public function getRegistrationDate(): ?DateTime
294
    {
295
        return $this->registrationDate;
296
    }
297
298
    public function setRegistrationDate(?DateTime $registrationDate): void
299
    {
300
        $this->registrationDate = $registrationDate;
301
    }
302
303
    public function setHidden(bool $hidden): void
304
    {
305
        $this->hidden = $hidden;
306
    }
307
308
    public function getHidden(): bool
309
    {
310
        return $this->hidden;
311
    }
312
313
    public function getAmountOfRegistrations(): int
314
    {
315
        return $this->amountOfRegistrations;
316
    }
317
318
    public function setAmountOfRegistrations(int $amountOfRegistrations): void
319
    {
320
        $this->amountOfRegistrations = $amountOfRegistrations;
321
    }
322
323
    public function getLanguage(): string
324
    {
325
        return $this->language;
326
    }
327
328
    public function setLanguage(string $language): void
329
    {
330
        $this->language = $language;
331
    }
332
333
    public function getCaptcha(): string
334
    {
335
        return $this->captcha;
336
    }
337
338
    public function setCaptcha(string $captcha): void
339
    {
340
        $this->captcha = $captcha;
341
    }
342
343
    public function getFeUser(): ?FrontendUser
344
    {
345
        return $this->feUser;
346
    }
347
348
    public function setFeUser(?FrontendUser $feUser): void
349
    {
350
        $this->feUser = $feUser;
351
    }
352
353
    public function getPaymentmethod(): string
354
    {
355
        return $this->paymentmethod;
356
    }
357
358
    public function setPaymentmethod(string $paymentmethod): void
359
    {
360
        $this->paymentmethod = $paymentmethod;
361
    }
362
363
    public function getPaymentReference(): string
364
    {
365
        return $this->paymentReference;
366
    }
367
368
    public function setPaymentReference(string $paymentReference): void
369
    {
370
        $this->paymentReference = $paymentReference;
371
    }
372
373
    public function getWaitlist(): bool
374
    {
375
        return $this->waitlist;
376
    }
377
378
    public function setWaitlist(bool $waitlist): void
379
    {
380
        $this->waitlist = $waitlist;
381
    }
382
383
    /**
384
     * @return ObjectStorage<FieldValue>|null
385
     */
386
    public function getFieldValues(): ?ObjectStorage
387
    {
388
        return $this->fieldValues;
389
    }
390
391
    public function setFieldValues(?ObjectStorage $fieldValues): void
392
    {
393
        $this->fieldValues = $fieldValues;
394
    }
395
396
    public function getFullname(): string
397
    {
398
        return $this->firstname . ' ' . $this->lastname;
399
    }
400
401
    public function getPrice(): float
402
    {
403
        return $this->price;
404
    }
405
406
    public function setPrice(float $price): void
407
    {
408
        $this->price = $price;
409
    }
410
411
    public function getPriceOption(): ?PriceOption
412
    {
413
        return $this->priceOption;
414
    }
415
416
    public function setPriceOption(?PriceOption $priceOption): void
417
    {
418
        $this->priceOption = $priceOption;
419
    }
420
}
421