Total Complexity | 6 |
Total Lines | 80 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
5 | class User |
||
6 | { |
||
7 | public const STATE_ACTIVE = 'active'; |
||
8 | public const STATE_BLOCKED = 'blocked'; |
||
9 | |||
10 | /** @var int */ |
||
11 | private $id; |
||
12 | |||
13 | /** @var string */ |
||
14 | private $username; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $name; |
||
18 | |||
19 | /** @var string */ |
||
20 | private $webUrl; |
||
21 | |||
22 | /** |
||
23 | * Project constructor. |
||
24 | * @param int $id |
||
25 | * @param string $username |
||
26 | * @param string $name |
||
27 | * @param string $webUrl |
||
28 | */ |
||
29 | 44 | public function __construct( |
|
39 | 44 | } |
|
40 | |||
41 | /** |
||
42 | * @param array $user |
||
43 | * @return User |
||
44 | */ |
||
45 | 44 | public static function fromArray(array $user): self |
|
52 | ); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return int |
||
57 | */ |
||
58 | 9 | public function getId(): int |
|
59 | { |
||
60 | 9 | return $this->id; |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * @return string |
||
65 | */ |
||
66 | 14 | public function getUsername(): string |
|
69 | } |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | 1 | public function getName(): string |
|
77 | } |
||
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | 2 | public function getWebUrl(): string |
|
85 | } |
||
86 | } |
||
87 |