| Total Complexity | 5 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class User |
||
| 10 | { |
||
| 11 | private $id; |
||
| 12 | private $name; |
||
| 13 | private $username; |
||
| 14 | private $data; |
||
| 15 | |||
| 16 | public function __construct(string $id, string $name = null, string $username = null, array $data = []) |
||
| 17 | { |
||
| 18 | $this->id = $id; |
||
| 19 | $this->name = $name; |
||
| 20 | $this->username = $username; |
||
| 21 | $this->data = collect($data); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getId(): string |
||
| 25 | { |
||
| 26 | return $this->id; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getName(): ?string |
||
| 30 | { |
||
| 31 | return $this->name; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getUsername(): ?string |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Additional user information. |
||
| 41 | * |
||
| 42 | * @return Collection |
||
| 43 | */ |
||
| 44 | public function getData(): Collection |
||
| 49 |