Passed
Push — dev ( 8f57e5...937521 )
by Nico
05:59
created

OpenedAdventDoor   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Test Coverage

Coverage 88.24%

Importance

Changes 0
Metric Value
eloc 29
c 0
b 0
f 0
dl 0
loc 63
ccs 15
cts 17
cp 0.8824
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUserId() 0 5 1
A setMonth() 0 5 1
A setTime() 0 5 1
A setDay() 0 5 1
A getId() 0 3 1
A setYear() 0 5 1
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\Table;
12
use Stu\Orm\Attribute\TruncateOnGameReset;
13
use Stu\Orm\Repository\OpenedAdventDoorRepository;
14
15
#[Table(name: 'stu_opened_advent_door')]
16
#[Entity(repositoryClass: OpenedAdventDoorRepository::class)]
17
#[TruncateOnGameReset]
18
class OpenedAdventDoor
19
{
20
    #[Id]
21
    #[Column(type: 'integer')]
22
    #[GeneratedValue(strategy: 'IDENTITY')]
23
    private int $id;
24
25
    #[Column(type: 'integer')]
26
    private int $user_id;
27
28
    #[Column(type: 'integer')]
29
    private int $day;
30
31
    #[Column(type: 'integer')]
32
    private int $month;
33
34
    #[Column(type: 'integer')]
35
    private int $year;
36
37
    #[Column(type: 'integer')]
38
    private int $time;
39
40
41
    public function getId(): int
42
    {
43
        return $this->id;
44
    }
45
46 2
    public function setUserId(int $userId): OpenedAdventDoor
47
    {
48 2
        $this->user_id = $userId;
49
50 2
        return $this;
51
    }
52
53 2
    public function setDay(int $day): OpenedAdventDoor
54
    {
55 2
        $this->day = $day;
56
57 2
        return $this;
58
    }
59
60 2
    public function setMonth(int $month): OpenedAdventDoor
61
    {
62 2
        $this->month = $month;
63
64 2
        return $this;
65
    }
66
67 2
    public function setYear(int $year): OpenedAdventDoor
68
    {
69 2
        $this->year = $year;
70
71 2
        return $this;
72
    }
73 2
    public function setTime(int $time): OpenedAdventDoor
74
    {
75 2
        $this->time = $time;
76
77 2
        return $this;
78
    }
79
}
80