Completed
Push — master ( 17cc82...f31b80 )
by Vladimir
02:38
created

User   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 43
ccs 11
cts 11
cp 1
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 2
    public function __construct(string $id, string $name = null, string $username = null)
14
    {
15 2
        $this->id = $id;
16 2
        $this->name = $name;
17 2
        $this->username = $username;
18 2
    }
19
20
    /**
21
     * Identifier.
22
     *
23
     * @return string
24
     */
25 2
    public function getId(): string
26
    {
27 2
        return $this->id;
28
    }
29
30
    /**
31
     * Full name.
32
     *
33
     * @return string|null
34
     */
35 2
    public function getName(): ?string
36
    {
37 2
        return $this->name;
38
    }
39
40
    /**
41
     * Username.
42
     *
43
     * @return string|null
44
     */
45 2
    public function getUsername(): ?string
46
    {
47 2
        return $this->username;
48
    }
49
}
50