TopicList   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 7
eloc 20
dl 0
loc 48
ccs 20
cts 20
cp 1
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getCounter() 0 3 1
A getName() 0 3 1
A getTime() 0 3 1
A isHeader() 0 3 1
A setData() 0 9 1
A getDesc() 0 3 1
A getId() 0 3 1
1
<?php
2
3
namespace kalanis\kw_forums\Content;
4
5
6
/**
7
 * Class TopicList
8
 * data about single topic
9
 *
10
 * @package kalanis\kw_forums\Content
11
 */
12
class TopicList
13
{
14
    protected int $id = 0;
15
    protected int $time = 0;
16
    protected int $counter = 0;
17
    protected string $name = '';
18
    protected string $desc = '';
19
    protected bool $isHeader = false;
20
21 1
    public function setData(int $id = 0, int $time = 0, string $name = '', string $desc = '', int $counter = 0, bool $isHeader = false): self
22
    {
23 1
        $this->id = $id;
24 1
        $this->time = $time;
25 1
        $this->name = $name;
26 1
        $this->desc = $desc;
27 1
        $this->counter = $counter;
28 1
        $this->isHeader = $isHeader;
29 1
        return $this;
30
    }
31
32 1
    public function getId(): int
33
    {
34 1
        return $this->id;
35
    }
36
37 1
    public function getTime(): int
38
    {
39 1
        return $this->time;
40
    }
41
42 1
    public function getCounter(): int
43
    {
44 1
        return $this->counter;
45
    }
46
47 1
    public function getName(): string
48
    {
49 1
        return $this->name;
50
    }
51
52 1
    public function getDesc(): string
53
    {
54 1
        return $this->desc;
55
    }
56
57 1
    public function isHeader(): bool
58
    {
59 1
        return $this->isHeader;
60
    }
61
}
62