Total Complexity | 7 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class FileGroup implements IGroup |
||
14 | { |
||
15 | /** @var int */ |
||
16 | protected $id = 0; |
||
17 | /** @var string */ |
||
18 | protected $name = ''; |
||
19 | /** @var int */ |
||
20 | protected $author = 0; |
||
21 | /** @var string */ |
||
22 | protected $displayName = ''; |
||
23 | /** @var int */ |
||
24 | protected $status = 0; |
||
25 | /** @var int[] */ |
||
26 | protected $parents = []; |
||
27 | |||
28 | /** |
||
29 | * @param int $id |
||
30 | * @param string $name |
||
31 | * @param int $author |
||
32 | * @param string $display |
||
33 | * @param int $status |
||
34 | * @param int[] $parents |
||
35 | */ |
||
36 | 19 | public function setData(int $id, string $name, int $author, string $display, int $status, array $parents = []): void |
|
37 | { |
||
38 | 19 | $this->id = $id; |
|
39 | 19 | $this->name = $name; |
|
40 | 19 | $this->author = $author; |
|
41 | 19 | $this->displayName = $display; |
|
42 | 19 | $this->status = $status; |
|
43 | 19 | $this->parents = $parents; |
|
44 | 19 | } |
|
45 | |||
46 | 5 | public function getGroupId(): int |
|
47 | { |
||
48 | 5 | return $this->id; |
|
49 | } |
||
50 | |||
51 | 15 | public function getGroupName(): string |
|
54 | } |
||
55 | |||
56 | 16 | public function getGroupAuthorId(): int |
|
57 | { |
||
58 | 16 | return $this->author; |
|
59 | } |
||
60 | |||
61 | 19 | public function getGroupDesc(): string |
|
62 | { |
||
63 | 19 | return $this->displayName; |
|
64 | } |
||
65 | |||
66 | 6 | public function getGroupStatus(): int |
|
67 | { |
||
68 | 6 | return $this->status; |
|
69 | } |
||
70 | |||
71 | /** |
||
72 | * @return int[] |
||
73 | */ |
||
74 | 5 | public function getGroupParents(): array |
|
77 | } |
||
78 | } |
||
79 |