UserRegistrationDTO   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 75
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 13
c 2
b 1
f 0
dl 0
loc 75
ccs 14
cts 14
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getLastName() 0 3 1
A getFirstName() 0 3 1
A getPlainPassword() 0 3 1
A getEmail() 0 3 1
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
}