Passed
Pull Request — master (#1838)
by Nico
49:55 queued 24:38
created

TSpacecraftItem::getCloakState()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Ship\Lib;
6
7
use Doctrine\ORM\Mapping\Column;
8
use Doctrine\ORM\Mapping\Id;
9
use Doctrine\ORM\Mapping\MappedSuperclass;
10
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...
11
use Stu\Component\Ship\SpacecraftTypeEnum;
12
13
#[MappedSuperclass]
14
abstract class TSpacecraftItem implements TSpacecraftItemInterface
15
{
16
    #[Id]
17
    #[Column(type: 'integer')]
18
    private int $ship_id = 0;
19
20
    #[Column(type: 'integer', nullable: true)]
21
    private ?int $fleet_id = null;
22
23
    #[Column(type: 'integer')]
24
    private int $rump_id = 0;
25
26
    #[Column(type: 'integer', nullable: true)]
27
    private ?int $former_rump_id = null;
28
29
    #[Column(type: 'integer', nullable: true)]
30
    private ?int $warp_state = null;
31
32
    #[Column(type: 'integer', nullable: true)]
33
    private ?int $tractor_warp_state = null;
34
35
    #[Column(type: 'integer', nullable: true)]
36
    private ?int $cloak_state = null;
37
38
    #[Column(type: 'integer', nullable: true)]
39
    private ?int $shield_state = null;
40
41
    #[Column(type: 'integer', nullable: true)]
42
    private ?int $uplink_state = null;
43
44
    #[Column(type: 'boolean')]
45
    private bool $is_destroyed = false;
46
47
    #[Column(type: 'integer')]
48
    private int $spacecraft_type = 0;
49
50
    #[Column(type: 'string')]
51
    private string $ship_name = '';
52
53
    #[Column(type: 'integer')]
54
    private int $hull = 0;
55
56
    #[Column(type: 'integer')]
57
    private int $max_hull = 0;
58
59
    #[Column(type: 'integer')]
60
    private int $shield = 0;
61
62
    #[Column(type: 'integer', nullable: true)]
63
    private ?int $web_id = null;
64
65
    #[Column(type: 'integer', nullable: true)]
66
    private ?int $web_finish_time = null;
67
68
    #[Column(type: 'integer')]
69
    private int $user_id = 0;
70
71
    #[Column(type: 'string')]
72
    private string $user_name = '';
73
74
    #[Column(type: 'integer')]
75
    private int $rump_category_id = 0;
76
77
    #[Column(type: 'string')]
78
    private string $rump_name = '';
79
80
    #[Column(type: 'integer', nullable: true)]
81
    private ?int $rump_role_id = null;
82
83
    #[Column(type: 'boolean')]
84
    private bool $has_logbook = false;
85
86
    #[Column(type: 'boolean')]
87
    private bool $has_crew = false;
88
89
    #[Override]
90
    public function getShipId(): int
91
    {
92
        return $this->ship_id;
93
    }
94
95
    #[Override]
96
    public function getFleetId(): ?int
97
    {
98
        return $this->fleet_id;
99
    }
100
101
    #[Override]
102
    public function getRumpId(): int
103
    {
104
        return $this->rump_id;
105
    }
106
107
    #[Override]
108
    public function getFormerRumpId(): ?int
109
    {
110
        return $this->former_rump_id;
111
    }
112
113
    #[Override]
114
    public function getWarpDriveState(): int
115
    {
116
        return $this->warp_state ?? 0;
117
    }
118
119
    #[Override]
120
    public function getTractorWarpState(): int
121
    {
122
        return $this->tractor_warp_state ?? 0;
123
    }
124
125
    #[Override]
126
    public function getCloakState(): int
127
    {
128
        return $this->cloak_state ?? 0;
129
    }
130
131
    #[Override]
132
    public function getShieldState(): int
133
    {
134
        return $this->shield_state ?? 0;
135
    }
136
137
    #[Override]
138
    public function getUplinkState(): int
139
    {
140
        return $this->uplink_state ?? 0;
141
    }
142
143
    #[Override]
144
    public function isDestroyed(): bool
145
    {
146
        return $this->is_destroyed;
147
    }
148
149
    #[Override]
150
    public function getSpacecraftType(): SpacecraftTypeEnum
151
    {
152
        return SpacecraftTypeEnum::from($this->spacecraft_type);
153
    }
154
155
    #[Override]
156
    public function getShipName(): string
157
    {
158
        return $this->ship_name;
159
    }
160
161
    #[Override]
162
    public function getHull(): int
163
    {
164
        return $this->hull;
165
    }
166
167
    #[Override]
168
    public function getMaxHull(): int
169
    {
170
        return $this->max_hull;
171
    }
172
173
    #[Override]
174
    public function getShield(): int
175
    {
176
        return $this->shield;
177
    }
178
179
    #[Override]
180
    public function getWebId(): ?int
181
    {
182
        return $this->web_id;
183
    }
184
185
    #[Override]
186
    public function getWebFinishTime(): ?int
187
    {
188
        return $this->web_finish_time;
189
    }
190
191
    #[Override]
192
    public function getUserId(): int
193
    {
194
        return $this->user_id;
195
    }
196
197
    #[Override]
198
    public function getUserName(): string
199
    {
200
        return $this->user_name;
201
    }
202
203
    #[Override]
204
    public function getRumpCategoryId(): int
205
    {
206
        return $this->rump_category_id;
207
    }
208
209
    #[Override]
210
    public function getRumpName(): string
211
    {
212
        return $this->rump_name;
213
    }
214
215
    #[Override]
216
    public function getRumpRoleId(): ?int
217
    {
218
        return $this->rump_role_id;
219
    }
220
221
    #[Override]
222
    public function hasLogbook(): bool
223
    {
224
        return $this->has_logbook;
225
    }
226
227
    #[Override]
228
    public function hasCrew(): bool
229
    {
230
        return $this->has_crew;
231
    }
232
}
233