Total Complexity | 5 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class TagDto |
||
8 | { |
||
9 | private $id; |
||
10 | private $name; |
||
11 | private $workspaceId; |
||
12 | |||
13 | public static function fromArray(array $data): self |
||
14 | { |
||
15 | return new self( |
||
16 | $data['id'], |
||
17 | $data['name'], |
||
18 | $data['workspaceId'] |
||
19 | ); |
||
20 | } |
||
21 | |||
22 | public function __construct(string $id, string $name, string $workspaceId) |
||
23 | { |
||
24 | $this->id = $id; |
||
25 | $this->name = $name; |
||
26 | $this->workspaceId = $workspaceId; |
||
27 | } |
||
28 | |||
29 | public function id(): string |
||
30 | { |
||
31 | return $this->id; |
||
32 | } |
||
33 | |||
34 | public function name(): string |
||
37 | } |
||
38 | |||
39 | public function workspaceId(): string |
||
42 | } |
||
43 | } |
||
44 |