Passed
Push — main ( 3a3127...3af14e )
by Daniel
04:18
created

User::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Uxmp\Core\Orm\Model;
6
7
/**
8
 * @Entity(repositoryClass="\Uxmp\Core\Orm\Repository\UserRepository")
9
 * @Table(name="user")
10
 */
11
class User implements UserInterface
12
{
13
    /**
14
     * @Id
15
     * @Column(type="integer")
16
     * @GeneratedValue
17
     */
18
    private int $id;
19
20
    /**
21
     * @Column(type="string")
22
     */
23
    private string $name = '';
24
25
    /**
26
     * @Column(type="string", options={"default" : "en"})
27
     */
28
    private string $language = 'en';
29
30
    /**
31
     * @Column(type="string")
32
     */
33
    private string $password = '';
34
35
    public function getId(): int
36
    {
37
        return $this->id;
38
    }
39
40 1
    public function getName(): string
41
    {
42 1
        return $this->name;
43
    }
44
45 1
    public function setName(string $name): UserInterface
46
    {
47 1
        $this->name = $name;
48 1
        return $this;
49
    }
50
51 1
    public function getPassword(): string
52
    {
53 1
        return $this->password;
54
    }
55
56 1
    public function setPassword(string $password): UserInterface
57
    {
58 1
        $this->password = $password;
59 1
        return $this;
60
    }
61
62
    /**
63
     * Returns the language iso2 code
64
     */
65 1
    public function getLanguage(): string
66
    {
67 1
        return $this->language;
68
    }
69
70 1
    public function setLanguage(string $language): UserInterface
71
    {
72 1
        $this->language = $language;
73 1
        return $this;
74
    }
75
}
76