Passed
Push — dev ( 1c3353...ed00e7 )
by Nico
29:47
created

TutorialStep::setModule()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
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
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
use Stu\Component\Game\ModuleViewEnum;
15
use Stu\Orm\Repository\TutorialStepRepository;
16
17
#[Table(name: 'stu_tutorial_step')]
18
#[Index(name: 'tutorial_view_idx', columns: ['module', 'view'])]
19
#[Index(name: 'tutorial_sort_idx', columns: ['sort'])]
20
#[Entity(repositoryClass: TutorialStepRepository::class)]
21
class TutorialStep implements TutorialStepInterface
22
{
23
    #[Id]
24
    #[Column(type: 'integer')]
25
    #[GeneratedValue(strategy: 'IDENTITY')]
26
    private int $id;
27
28
    #[Column(type: 'string', length: 50, enumType: ModuleViewEnum::class)]
29
    private ModuleViewEnum $module;
30
31
    #[Column(type: 'string', length: 100, nullable: true)]
32
    private ?string $view = null;
33
34
    #[Column(type: 'integer')]
35
    private int $sort = 0;
36
37
    #[Column(type: 'text', nullable: true)]
38
    private ?string $title = null;
39
40
    #[Column(type: 'text', nullable: true)]
41
    private ?string $text = null;
42
43
    #[Column(type: 'text', nullable: true)]
44
    private ?string $elementIds = null;
45
46
    #[Column(type: 'text', nullable: true)]
47
    private ?string $innerUpdate = null;
48
49
    #[Column(type: 'integer', nullable: true)]
50
    private ?int $fallbackIndex = null;
51
52
    #[Override]
53
    public function getId(): int
54
    {
55
        return $this->id;
56
    }
57
58
    public function getModule(): ModuleViewEnum
59
    {
60
        return $this->module;
61
    }
62
63
    public function setModule(ModuleViewEnum $module): void
64
    {
65
        $this->module = $module;
66
    }
67
68
    public function getView(): ?string
69
    {
70
        return $this->view;
71
    }
72
73
    public function setView(?string $view): void
74
    {
75
        $this->view = $view;
76
    }
77
78
    public function getSort(): int
79
    {
80
        return $this->sort;
81
    }
82
83
    public function setSort(int $sort): void
84
    {
85
        $this->sort = $sort;
86
    }
87
88
    public function getTitle(): ?string
89
    {
90
        return $this->title;
91
    }
92
93
    public function setTitle(?string $title): void
94
    {
95
        $this->title = $title;
96
    }
97
98
    public function getText(): ?string
99
    {
100
        return $this->text;
101
    }
102
103
    public function setText(?string $text): void
104
    {
105
        $this->text = $text;
106
    }
107
108
    public function getElementIds(): ?string
109
    {
110
        return $this->elementIds;
111
    }
112
113
    public function setElementIds(?string $elementIds): void
114
    {
115
        $this->elementIds = $elementIds;
116
    }
117
118
    public function getInnerUpdate(): ?string
119
    {
120
        return $this->innerUpdate;
121
    }
122
123
    public function setInnerUpdate(?string $innerUpdate): void
124
    {
125
        $this->innerUpdate = $innerUpdate;
126
    }
127
128
    public function getFallbackIndex(): ?int
129
    {
130
        return $this->fallbackIndex;
131
    }
132
133
    public function setFallbackIndex(?int $fallbackIndex): void
134
    {
135
        $this->fallbackIndex = $fallbackIndex;
136
    }
137
}
138