Passed
Push — dev ( 6fa4a9...182017 )
by Janko
16:15 queued 15s
created

GameTurnStats::setNewPmCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
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\JoinColumn;
13
use Doctrine\ORM\Mapping\OneToOne;
14
use Doctrine\ORM\Mapping\Table;
15
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...
16
use Stu\Orm\Repository\GameTurnStatsRepository;
17
18
#[Table(name: 'stu_game_turn_stats')]
19
#[Index(name: 'game_turn_stats_turn_idx', columns: ['turn_id'])]
20
#[Entity(repositoryClass: GameTurnStatsRepository::class)]
21
class GameTurnStats implements GameTurnStatsInterface
22
{
23
    #[Id]
24
    #[Column(type: 'integer')]
25
    #[GeneratedValue(strategy: 'IDENTITY')]
26
    private int $id;
27
28
    #[Column(type: 'integer')]
29
    private int $turn_id;
30
31
    #[Column(type: 'integer')]
32
    private int $user_count;
33
34
    #[Column(type: 'integer')]
35
    private int $logins_24h;
36
37
    #[Column(type: 'integer')]
38
    private int $inactive_count;
39
40
    #[Column(type: 'integer')]
41
    private int $vacation_count;
42
43
    #[Column(type: 'integer')]
44
    private int $ship_count;
45
46
    #[Column(type: 'integer')]
47
    private int $ship_count_manned;
48
49
    #[Column(type: 'integer')]
50
    private int $ship_count_npc;
51
52
    #[Column(type: 'integer')]
53
    private int $kn_count;
54
55
    #[Column(type: 'integer')]
56
    private int $flight_sig_24h;
57
58
    #[Column(type: 'integer')]
59
    private int $flight_sig_system_24h;
60
61
    #[Column(type: 'integer')]
62
    private int $new_pm_count;
63
64
    #[OneToOne(targetEntity: 'GameTurn')]
65
    #[JoinColumn(name: 'turn_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
66
    private GameTurnInterface $turn;
67
68
    #[Override]
69
    public function getId(): int
70
    {
71
        return $this->id;
72
    }
73
74
    #[Override]
75
    public function getTurn(): GameTurnInterface
76
    {
77
        return $this->turn;
78
    }
79
80
    #[Override]
81
    public function setTurn(GameTurnInterface $turn): GameTurnStatsInterface
82
    {
83
        $this->turn = $turn;
84
        return $this;
85
    }
86
87
    #[Override]
88
    public function getUserCount(): int
89
    {
90
        return $this->user_count;
91
    }
92
93
    #[Override]
94
    public function setUserCount(int $userCount): GameTurnStatsInterface
95
    {
96
        $this->user_count = $userCount;
97
98
        return $this;
99
    }
100
101
    #[Override]
102
    public function getLogins24h(): int
103
    {
104
        return $this->logins_24h;
105
    }
106
107
    #[Override]
108
    public function setLogins24h(int $logins24h): GameTurnStatsInterface
109
    {
110
        $this->logins_24h = $logins24h;
111
112
        return $this;
113
    }
114
115
    #[Override]
116
    public function getInactiveCount(): int
117
    {
118
        return $this->inactive_count;
119
    }
120
121
    #[Override]
122
    public function setInactiveCount(int $inactiveCount): GameTurnStatsInterface
123
    {
124
        $this->inactive_count = $inactiveCount;
125
126
        return $this;
127
    }
128
129
    #[Override]
130
    public function getVacationCount(): int
131
    {
132
        return $this->vacation_count;
133
    }
134
135
    #[Override]
136
    public function setVacationCount(int $vacationCount): GameTurnStatsInterface
137
    {
138
        $this->vacation_count = $vacationCount;
139
140
        return $this;
141
    }
142
143
    #[Override]
144
    public function getShipCount(): int
145
    {
146
        return $this->ship_count;
147
    }
148
149
    #[Override]
150
    public function setShipCount(int $shipCount): GameTurnStatsInterface
151
    {
152
        $this->ship_count = $shipCount;
153
154
        return $this;
155
    }
156
157
    #[Override]
158
    public function getShipCountManned(): int
159
    {
160
        return $this->ship_count_manned;
161
    }
162
163
    #[Override]
164
    public function setShipCountManned(int $shipCountManned): GameTurnStatsInterface
165
    {
166
        $this->ship_count_manned = $shipCountManned;
167
168
        return $this;
169
    }
170
171
    #[Override]
172
    public function getShipCountNpc(): int
173
    {
174
        return $this->ship_count_npc;
175
    }
176
177
    #[Override]
178
    public function setShipCountNpc(int $shipCountNpc): GameTurnStatsInterface
179
    {
180
        $this->ship_count_npc = $shipCountNpc;
181
182
        return $this;
183
    }
184
185
    #[Override]
186
    public function getKnCount(): int
187
    {
188
        return $this->kn_count;
189
    }
190
191
    #[Override]
192
    public function setKnCount(int $knCount): GameTurnStatsInterface
193
    {
194
        $this->kn_count = $knCount;
195
196
        return $this;
197
    }
198
199
    #[Override]
200
    public function getFlightSig24h(): int
201
    {
202
        return $this->flight_sig_24h;
203
    }
204
205
    #[Override]
206
    public function setFlightSig24h(int $flightSig24h): GameTurnStatsInterface
207
    {
208
        $this->flight_sig_24h = $flightSig24h;
209
210
        return $this;
211
    }
212
213
    #[Override]
214
    public function getFlightSigSystem24h(): int
215
    {
216
        return $this->flight_sig_system_24h;
217
    }
218
219
    #[Override]
220
    public function setFlightSigSystem24h(int $flightSigSystem24h): GameTurnStatsInterface
221
    {
222
        $this->flight_sig_system_24h = $flightSigSystem24h;
223
224
        return $this;
225
    }
226
227
    #[Override]
228
    public function getNewPmCount(): int
229
    {
230
        return $this->new_pm_count;
231
    }
232
233
    #[Override]
234
    public function setNewPmCount(int $newPmCount): GameTurnStatsInterface
235
    {
236
        $this->new_pm_count = $newPmCount;
237
238
        return $this;
239
    }
240
241
    #[Override]
242
    public function __toString(): string
243
    {
244
        return sprintf(
245
            'id: %s, turnId: %s',
246
            $this->id,
247
            $this->turn_id
248
        );
249
    }
250
}
251