User   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 50
rs 10
wmc 5
lcom 0
cbo 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A nickname() 0 4 1
A username() 0 4 1
A realname() 0 4 1
A usermode() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Spires\Irc;
5
6
class User
7
{
8
    /**
9
     * @var string
10
     */
11
    private $nickname;
12
13
    /**
14
     * @var string
15
     */
16
    private $username;
17
18
    /**
19
     * @var string
20
     */
21
    private $realname;
22
23
    /**
24
     * @var int
25
     */
26
    private $usermode;
27
28
    public function __construct(string $nickname, string $username, string $realname, int $usermode = 0)
29
    {
30
        $this->nickname = $nickname;
31
        $this->username = $username;
32
        $this->realname = $realname;
33
        $this->usermode = $usermode;
34
    }
35
36
    public function nickname() : string
37
    {
38
        return $this->nickname;
39
    }
40
41
    public function username() : string
42
    {
43
        return $this->username;
44
    }
45
46
    public function realname() : string
47
    {
48
        return $this->realname;
49
    }
50
51
    public function usermode() : int
52
    {
53
        return $this->usermode;
54
    }
55
}
56