AbstractUserMessage::getCompanyId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Yproximite\Api\Message\User;
5
6
use Yproximite\Api\Message\MessageInterface;
7
8
/**
9
 * Class AbstractUserMessage
10
 */
11
abstract class AbstractUserMessage implements MessageInterface
12
{
13
    /**
14
     * @var string
15
     */
16
    private $firstName;
17
18
    /**
19
     * @var string
20
     */
21
    private $lastName;
22
23
    /**
24
     * @var string
25
     */
26
    private $email;
27
28
    /**
29
     * @var string|null
30
     */
31
    private $plainPassword;
32
33
    /**
34
     * @var string|null
35
     */
36
    private $phone;
37
38
    /**
39
     * @var string|null
40
     */
41
    private $defaultLocale;
42
43
    /**
44
     * @var int
45
     */
46
    private $companyId;
47
48
    /**
49
     * @return string
50
     */
51
    public function getFirstName(): string
52
    {
53
        return $this->firstName;
54
    }
55
56
    /**
57
     * @param string $firstName
58
     */
59
    public function setFirstName(string $firstName)
60
    {
61
        $this->firstName = $firstName;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getLastName(): string
68
    {
69
        return $this->lastName;
70
    }
71
72
    /**
73
     * @param string $lastName
74
     */
75
    public function setLastName(string $lastName)
76
    {
77
        $this->lastName = $lastName;
78
    }
79
80
    /**
81
     * @return string
82
     */
83
    public function getEmail(): string
84
    {
85
        return $this->email;
86
    }
87
88
    /**
89
     * @param string $email
90
     */
91
    public function setEmail(string $email)
92
    {
93
        $this->email = $email;
94
    }
95
96
    /**
97
     * @return null|string
98
     */
99
    public function getPlainPassword()
100
    {
101
        return $this->plainPassword;
102
    }
103
104
    /**
105
     * @param null|string $plainPassword
106
     */
107
    public function setPlainPassword(string $plainPassword = null)
108
    {
109
        $this->plainPassword = $plainPassword;
110
    }
111
112
    /**
113
     * @return null|string
114
     */
115
    public function getPhone()
116
    {
117
        return $this->phone;
118
    }
119
120
    /**
121
     * @param null|string $phone
122
     */
123
    public function setPhone(string $phone = null)
124
    {
125
        $this->phone = $phone;
126
    }
127
128
    /**
129
     * @return null|string
130
     */
131
    public function getDefaultLocale()
132
    {
133
        return $this->defaultLocale;
134
    }
135
136
    /**
137
     * @param null|string $defaultLocale
138
     */
139
    public function setDefaultLocale(string $defaultLocale = null)
140
    {
141
        $this->defaultLocale = $defaultLocale;
142
    }
143
144
    /**
145
     * @return int
146
     */
147
    public function getCompanyId(): int
148
    {
149
        return $this->companyId;
150
    }
151
152
    /**
153
     * @param int $companyId
154
     */
155
    public function setCompanyId(int $companyId)
156
    {
157
        $this->companyId = $companyId;
158
    }
159
160
    /**
161
     * {@inheritdoc}
162
     */
163
    public function build()
164
    {
165
        return [
166
            'firstName'     => $this->getFirstName(),
167
            'lastName'      => $this->getLastName(),
168
            'email'         => $this->getEmail(),
169
            'plainPassword' => $this->getPlainPassword(),
170
            'phone'         => $this->getPhone(),
171
            'defaultLocale' => $this->getDefaultLocale(),
172
        ];
173
    }
174
}
175