UserRegistrationDTO::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 9
ccs 5
cts 5
cp 1
crap 1
rs 10
1
<?php
2
namespace App\DTO;
3
4
use Ramsey\Uuid\Uuid;
5
use Symfony\Component\Validator\Constraints as Assert;
6
use JMS\Serializer\Annotation\Type;
7
8
class UserRegistrationDTO {
9
    /**
10
     * @var string|null
11
     * @Type("string")
12
     * @Assert\Length(max=255)
13
     */
14
    private $firstName;
15
    /**
16
     * @var string|null
17
     * @Type("string")
18
     * @Assert\Length(max=255)
19
     */
20
    private $lastName;
21
    /**
22
     * @var string|null
23
     * @Type("string")
24
     * @Assert\Length(max=255)
25
     */
26
    private $email;
27
    /**
28
     * @var string|null
29
     * @Type("string")
30
     * @Assert\Length(max=255)
31
     */
32
    private $plainPassword;
33
34
35
    /**
36
     * UserRegistrationDTO constructor.
37
     * @param string|null $firstName
38
     * @param string|null $lastName
39
     * @param string|null $email
40
     * @param string|null $plainPassword
41
     */
42 1
    public function __construct(?string $firstName = null,
43
                                ?string $lastName = null,
44
                                ?string $email = null,
45
                                ?string $plainPassword = null)
46
    {
47 1
        $this->firstName = $firstName;
48 1
        $this->lastName = $lastName;
49 1
        $this->email = $email;
50 1
        $this->plainPassword = $plainPassword;
51 1
    }
52
53
    /**
54
     * @return string|null
55
     */
56 1
    public function getFirstName(): ?string
57
    {
58 1
        return $this->firstName;
59
    }
60
61
    /**
62
     * @return string|null
63
     */
64 1
    public function getLastName(): ?string
65
    {
66 1
        return $this->lastName;
67
    }
68
69
    /**
70
     * @return string|null
71
     */
72 1
    public function getEmail(): ?string
73
    {
74 1
        return $this->email;
75
    }
76
77
    /**
78
     * @return string|null
79
     */
80 1
    public function getPlainPassword(): ?string
81
    {
82 1
        return $this->plainPassword;
83
    }
84
}