Test Failed
Pull Request — master (#1646)
by Nico
10:48
created

TShipItem   A

Complexity

Total Complexity 22

Size/Duplication

Total Lines 176
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 45
c 1
b 0
f 0
dl 0
loc 176
ccs 0
cts 44
cp 0
rs 10
wmc 22

22 Methods

Rating   Name   Duplication   Size   Complexity  
A getSpacecraftType() 0 3 1
A isDestroyed() 0 3 1
A getShieldState() 0 3 1
A getShipId() 0 3 1
A getRumpRoleId() 0 3 1
A getShield() 0 3 1
A getRumpId() 0 3 1
A getCloakState() 0 3 1
A getMaxHull() 0 3 1
A getWebId() 0 3 1
A getRumpName() 0 3 1
A getFleetId() 0 3 1
A getRumpCategoryId() 0 3 1
A getUplinkState() 0 3 1
A getFormerRumpId() 0 3 1
A getWarpState() 0 3 1
A getShipName() 0 3 1
A hasLogbook() 0 3 1
A getUserId() 0 3 1
A getWebFinishTime() 0 3 1
A getHull() 0 3 1
A getUserName() 0 3 1
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\Entity;
9
use Doctrine\ORM\Mapping\Id;
10
11
/**
12
 * @Entity
13
 */
14
class TShipItem implements TShipItemInterface
15
{
16
    /** @Id @Column(type="integer") * */
17
    private int $ship_id = 0;
18
19
    /** @Column(type="integer", nullable=true) * */
20
    private ?int $fleet_id = null;
21
22
    /** @Column(type="integer") * */
23
    private int $rump_id = 0;
24
25
    /** @Column(type="integer", nullable=true) * */
26
    private ?int $former_rump_id = null;
27
28
    /** @Column(type="integer", nullable=true) * */
29
    private ?int $warp_state = null;
30
31
    /** @Column(type="integer", nullable=true) * */
32
    private ?int $cloak_state = null;
33
34
    /** @Column(type="integer", nullable=true) * */
35
    private ?int $shield_state = null;
36
37
    /** @Column(type="integer", nullable=true) * */
38
    private ?int $uplink_state = null;
39
40
    /** @Column(type="boolean") * */
41
    private bool $is_destroyed = false;
42
43
    /** @Column(type="integer") * */
44
    private int $spacecraft_type = 0;
45
46
    /** @Column(type="string") * */
47
    private string $ship_name = '';
48
49
    /** @Column(type="integer") * */
50
    private int $hull = 0;
51
52
    /** @Column(type="integer") * */
53
    private int $max_hull = 0;
54
55
    /** @Column(type="integer") * */
56
    private int $shield = 0;
57
58
    /** @Column(type="integer", nullable=true) * */
59
    private ?int $web_id = null;
60
61
    /** @Column(type="integer", nullable=true) * */
62
    private ?int $web_finish_time = null;
63
64
    /** @Column(type="integer") * */
65
    private int $user_id = 0;
66
67
    /** @Column(type="string") * */
68
    private string $user_name = '';
69
70
    /** @Column(type="integer") * */
71
    private int $rump_category_id = 0;
72
73
    /** @Column(type="string") * */
74
    private string $rump_name = '';
75
76
    /** @Column(type="integer", nullable=true) * */
77
    private ?int $rump_role_id = null;
78
79
    /** @Column(type="boolean") * */
80
    private bool $has_logbook = false;
81
82
    public function getShipId(): int
83
    {
84
        return $this->ship_id;
85
    }
86
87
    public function getFleetId(): ?int
88
    {
89
        return $this->fleet_id;
90
    }
91
92
    public function getRumpId(): int
93
    {
94
        return $this->rump_id;
95
    }
96
97
    public function getFormerRumpId(): ?int
98
    {
99
        return $this->former_rump_id;
100
    }
101
102
    public function getWarpState(): int
103
    {
104
        return $this->warp_state ?? 0;
105
    }
106
107
    public function getCloakState(): int
108
    {
109
        return $this->cloak_state ?? 0;
110
    }
111
112
    public function getShieldState(): int
113
    {
114
        return $this->shield_state ?? 0;
115
    }
116
117
    public function getUplinkState(): int
118
    {
119
        return $this->uplink_state ?? 0;
120
    }
121
122
    public function isDestroyed(): bool
123
    {
124
        return $this->is_destroyed;
125
    }
126
127
    public function getSpacecraftType(): int
128
    {
129
        return $this->spacecraft_type;
130
    }
131
132
    public function getShipName(): string
133
    {
134
        return $this->ship_name;
135
    }
136
137
    public function getHull(): int
138
    {
139
        return $this->hull;
140
    }
141
142
    public function getMaxHull(): int
143
    {
144
        return $this->max_hull;
145
    }
146
147
    public function getShield(): int
148
    {
149
        return $this->shield;
150
    }
151
152
    public function getWebId(): ?int
153
    {
154
        return $this->web_id;
155
    }
156
157
    public function getWebFinishTime(): ?int
158
    {
159
        return $this->web_finish_time;
160
    }
161
162
    public function getUserId(): int
163
    {
164
        return $this->user_id;
165
    }
166
167
    public function getUserName(): string
168
    {
169
        return $this->user_name;
170
    }
171
172
    public function getRumpCategoryId(): int
173
    {
174
        return $this->rump_category_id;
175
    }
176
177
    public function getRumpName(): string
178
    {
179
        return $this->rump_name;
180
    }
181
182
    public function getRumpRoleId(): ?int
183
    {
184
        return $this->rump_role_id;
185
    }
186
187
    public function hasLogbook(): bool
188
    {
189
        return $this->has_logbook;
190
    }
191
}
192