Passed
Push — master ( b965a8...709c0d )
by Nico
49:45 queued 24:59
created

UserContainer   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 25
c 2
b 0
f 0
dl 0
loc 69
ccs 0
cts 25
cp 0
rs 10
wmc 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A showDeals() 0 3 2
A getPrestige() 0 3 1
A getFactionId() 0 3 1
A __construct() 0 18 1
A getCss() 0 3 1
A getId() 0 3 1
A hasStationsNavigation() 0 3 1
A getName() 0 3 1
A getAvatar() 0 3 1
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
    private bool $showDeals;
17
18
    public function __construct(
19
        int $id,
20
        string $avatar,
21
        string $name,
22
        ?int $factionId,
23
        string $css,
24
        int $prestige,
25
        bool $hasStationsNavigation,
26
        bool $showDeals
27
    ) {
28
        $this->id = $id;
29
        $this->avatar = $avatar;
30
        $this->name = $name;
31
        $this->factionId = $factionId;
32
        $this->css = $css;
33
        $this->prestige = $prestige;
34
        $this->hasStationsNavigation = $hasStationsNavigation;
35
        $this->showDeals = $showDeals;
36
    }
37
38
    public function getId(): int
39
    {
40
        return $this->id;
41
    }
42
43
    public function getAvatar(): string
44
    {
45
        return $this->avatar;
46
    }
47
48
    public function getName(): string
49
    {
50
        return $this->name;
51
    }
52
53
    public function getFactionId(): ?int
54
    {
55
        return $this->factionId;
56
    }
57
58
    public function getCss(): string
59
    {
60
        return $this->css;
61
    }
62
63
    public function getPrestige(): int
64
    {
65
        return $this->prestige;
66
    }
67
68
    public function hasStationsNavigation(): bool
69
    {
70
        return $this->hasStationsNavigation;
71
    }
72
73
    public function showDeals(): int
74
    {
75
        return $this->showDeals ? 1 : 0;
76
    }
77
}
78