Completed
Push — master ( 6b086b...7ffeec )
by Łukasz
02:25
created

UpdateCustomer::subscribedToNewsletter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sylius\ShopApiPlugin\Command;
6
7
final class UpdateCustomer
8
{
9
    /** @var string */
10
    private $firstName;
11
12
    /** @var string */
13
    private $lastName;
14
15
    /** @var string */
16
    private $email;
17
18
    /** @var string|null */
19
    private $birthday;
20
21
    /** @var string */
22
    private $gender;
23
24
    /** @var string|null */
25
    private $phoneNumber;
26
27
    /** @var bool */
28
    private $subscribedToNewsletter;
29
30
    public function __construct(string $firstName, string $lastName, string $email, ?string $birthday, string $gender, ?string $phoneNumber, ?bool $subscribedToNewsletter)
31
    {
32
        $this->firstName = $firstName;
33
        $this->lastName = $lastName;
34
        $this->email = $email;
35
        $this->birthday = $birthday;
36
        $this->gender = $gender;
37
        $this->phoneNumber = $phoneNumber;
38
        $this->subscribedToNewsletter = $subscribedToNewsletter;
39
    }
40
41
    /** @return string */
42
    public function firstName(): string
43
    {
44
        return $this->firstName;
45
    }
46
47
    /** @return string */
48
    public function lastName(): string
49
    {
50
        return $this->lastName;
51
    }
52
53
    /** @return string */
54
    public function email(): string
55
    {
56
        return $this->email;
57
    }
58
59
    /** @return string|null */
60
    public function birthday(): ?string
61
    {
62
        return $this->birthday;
63
    }
64
65
    /** @return string|null */
66
    public function gender(): ?string
67
    {
68
        return $this->gender;
69
    }
70
71
    /** @return string|null */
72
    public function phoneNumber(): ?string
73
    {
74
        return $this->phoneNumber;
75
    }
76
77
    /** @return bool */
78
    public function subscribedToNewsletter(): bool
79
    {
80
        return $this->subscribedToNewsletter;
81
    }
82
}
83