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

User::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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