Passed
Push — master ( 61fa52...b9d74d )
by Vladimir
13:13
created

User   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 43
ccs 0
cts 11
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getId() 0 4 1
A getName() 0 4 1
A getUsername() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Drivers;
6
7
class User
8
{
9
    private $id;
10
    private $name;
11
    private $username;
12
13
    public function __construct(string $id, string $name = null, string $username = null)
14
    {
15
        $this->id = $id;
16
        $this->name = $name;
17
        $this->username = $username;
18
    }
19
20
    /**
21
     * Identifier.
22
     *
23
     * @return string
24
     */
25
    public function getId(): string
26
    {
27
        return $this->id;
28
    }
29
30
    /**
31
     * Full name.
32
     *
33
     * @return string|null
34
     */
35
    public function getName(): ?string
36
    {
37
        return $this->name;
38
    }
39
40
    /**
41
     * Username.
42
     *
43
     * @return string|null
44
     */
45
    public function getUsername(): ?string
46
    {
47
        return $this->username;
48
    }
49
}
50