Passed
Push — master ( b28c40...f61e74 )
by Petr
08:06
created

FileGroup::getGroupParents()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace kalanis\kw_auth\Data;
4
5
6
use kalanis\kw_auth\Interfaces\IGroup;
7
8
9
/**
10
 * Class FileGroup
11
 * @package kalanis\kw_auth\Data
12
 */
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
52
    {
53 15
        return $this->name;
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
75
    {
76 5
        return $this->parents;
77
    }
78
}
79