| 1 | <?php |
||
| 7 | class User |
||
| 8 | { |
||
| 9 | private $id; |
||
| 10 | private $name; |
||
| 11 | private $username; |
||
| 12 | |||
| 13 | 2 | public function __construct(string $id, string $name = null, string $username = null) |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Identifier. |
||
| 22 | * |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | 2 | public function getId(): string |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Full name. |
||
| 32 | * |
||
| 33 | * @return string|null |
||
| 34 | */ |
||
| 35 | 2 | public function getName(): ?string |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Username. |
||
| 42 | * |
||
| 43 | * @return string|null |
||
| 44 | */ |
||
| 45 | 2 | public function getUsername(): ?string |
|
| 49 | } |
||
| 50 |