1 | <?php declare(strict_types = 1); |
||
5 | class Address |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | private $email; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $name; |
||
16 | |||
17 | 11 | public function __construct(string $email, string $name = null) |
|
22 | |||
23 | /** |
||
24 | * Get email address. |
||
25 | * |
||
26 | * @return string |
||
27 | */ |
||
28 | 2 | public function getEmail(): string |
|
32 | |||
33 | /** |
||
34 | * Get display name. |
||
35 | * |
||
36 | * @return string|null |
||
37 | */ |
||
38 | 4 | public function getName() |
|
42 | } |
||
43 |