User::getUsername()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace DH\DoctrineAuditBundle\User;
4
5
class User implements UserInterface
6
{
7
    /**
8
     * @var null|int|string
9
     */
10
    protected $id;
11
12
    /**
13
     * @var null|string
14
     */
15
    protected $username;
16
17
    /**
18
     * User constructor.
19
     *
20
     * @param null|int|string $id
21
     * @param null|string     $username
22
     */
23
    public function __construct($id = null, ?string $username = null)
24
    {
25
        $this->id = $id;
26
        $this->username = $username;
27
    }
28
29
    /**
30
     * @return null|int|string
31
     */
32
    public function getId()
33
    {
34
        return $this->id;
35
    }
36
37
    public function getUsername(): ?string
38
    {
39
        return $this->username;
40
    }
41
}
42