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

UpdateCustomer   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 76
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A firstName() 0 4 1
A lastName() 0 4 1
A email() 0 4 1
A birthday() 0 4 1
A gender() 0 4 1
A phoneNumber() 0 4 1
A subscribedToNewsletter() 0 4 1
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