PostList   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
eloc 17
dl 0
loc 41
ccs 17
cts 17
cp 1
rs 10
c 0
b 0
f 0

6 Methods

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