User::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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