Passed
Push — dev ( 846ccd...b53707 )
by Janko
08:43
created

UserContainer::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Control\Render;
6
7
final class UserContainer
8
{
9
    private int $id;
10
    private string $avatar;
11
    private string $name;
12
    private ?int $factionId;
13
    private string $css;
14
    private int $prestige;
15
    private bool $hasStationsNavigation;
16
17
    public function __construct(
18
        int $id,
19
        string $avatar,
20
        string $name,
21
        ?int $factionId,
22
        string $css,
23
        int $prestige,
24
        bool $hasStationsNavigation,
25
    ) {
26
        $this->id = $id;
27
        $this->avatar = $avatar;
28
        $this->name = $name;
29
        $this->factionId = $factionId;
30
        $this->css = $css;
31
        $this->prestige = $prestige;
32
        $this->hasStationsNavigation = $hasStationsNavigation;
33
    }
34
35
    public function getId(): int
36
    {
37
        return $this->id;
38
    }
39
40
    public function getAvatar(): string
41
    {
42
        return $this->avatar;
43
    }
44
45
    public function getName(): string
46
    {
47
        return $this->name;
48
    }
49
50
    public function getFactionId(): ?int
51
    {
52
        return $this->factionId;
53
    }
54
55
    public function getCss(): string
56
    {
57
        return $this->css;
58
    }
59
60
    public function getPrestige(): int
61
    {
62
        return $this->prestige;
63
    }
64
65
    public function hasStationsNavigation(): bool
66
    {
67
        return $this->hasStationsNavigation;
68
    }
69
}
70