User   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 35
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getUsername() 0 3 1
A getId() 0 3 1
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