Passed
Push — master ( 141183...2b56eb )
by Petr
08:03
created

FileGroup   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 45
ccs 17
cts 17
cp 1
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getGroupName() 0 3 1
A getGroupId() 0 3 1
A getGroupStatus() 0 3 1
A setData() 0 7 1
A getGroupDesc() 0 3 1
A getGroupAuthorId() 0 3 1
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
26 19
    public function setData(int $id, string $name, int $author, string $display, int $status): void
27
    {
28 19
        $this->id = $id;
29 19
        $this->name = $name;
30 19
        $this->author = $author;
31 19
        $this->displayName = $display;
32 19
        $this->status = $status;
33 19
    }
34
35 5
    public function getGroupId(): int
36
    {
37 5
        return $this->id;
38
    }
39
40 15
    public function getGroupName(): string
41
    {
42 15
        return $this->name;
43
    }
44
45 16
    public function getGroupAuthorId(): int
46
    {
47 16
        return $this->author;
48
    }
49
50 19
    public function getGroupDesc(): string
51
    {
52 19
        return $this->displayName;
53
    }
54
55 6
    public function getGroupStatus(): int
56
    {
57 6
        return $this->status;
58
    }
59
}
60