Test Failed
Pull Request — master (#1775)
by Nico
26:52
created

NPCLog::getId()   A

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
declare(strict_types=1);
4
5
namespace Stu\Orm\Entity;
6
7
use Doctrine\ORM\Mapping\Column;
8
use Doctrine\ORM\Mapping\Entity;
9
use Doctrine\ORM\Mapping\GeneratedValue;
10
use Doctrine\ORM\Mapping\Id;
11
use Doctrine\ORM\Mapping\Index;
12
use Doctrine\ORM\Mapping\Table;
13
14
15
#[Table(name: 'stu_npc_log')]
16
#[Entity(repositoryClass: 'Stu\Orm\Repository\NPCLogRepository')]
17
class NPCLog implements NPCLogInterface
18
{
19
    #[Id]
20
    #[Column(type: 'integer')]
21
    #[GeneratedValue(strategy: 'IDENTITY')]
22
    private int $id;
23
24
    #[Column(type: 'text')]
25
    private string $text = '';
26
27
    #[Column(type: 'integer')]
28
    private int $date = 0;
29
30
    #[Column(type: 'integer', nullable: true)]
31
    private ?int $source_user_id = 0;
32
33
34
35
    public function getId(): int
36
    {
37
        return $this->id;
38
    }
39
40
    public function getText(): string
41
    {
42
        return $this->text;
43
    }
44
45
    public function setText(string $text): NPCLogInterface
46
    {
47
        $this->text = $text;
48
49
        return $this;
50
    }
51
52
    public function getDate(): int
53
    {
54
        return $this->date;
55
    }
56
57
    public function setDate(int $date): NPCLogInterface
58
    {
59
        $this->date = $date;
60
61
        return $this;
62
    }
63
64
    public function getSourceUserId(): ?int
65
    {
66
        return $this->source_user_id;
67
    }
68
69
    public function setSourceUserId(int $sourceuserId): NPCLogInterface
70
    {
71
        $this->source_user_id = $sourceuserId;
72
73
        return $this;
74
    }
75
}
76