Passed
Push — dev ( 842324...d0c170 )
by Janko
14:41
created

GameTurnStats   A

Complexity

Total Complexity 24

Size/Duplication

Total Lines 213
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 95
c 1
b 1
f 0
dl 0
loc 213
ccs 0
cts 62
cp 0
rs 10
wmc 24

24 Methods

Rating   Name   Duplication   Size   Complexity  
A setKnCount() 0 6 1
A setVacationCount() 0 6 1
A getShipCount() 0 4 1
A getUserCount() 0 4 1
A setTurn() 0 5 1
A getVacationCount() 0 4 1
A setFlightSig24h() 0 6 1
A getTurn() 0 4 1
A setUserCount() 0 6 1
A getId() 0 4 1
A getInactiveCount() 0 4 1
A getShipCountManned() 0 4 1
A getShipCountNpc() 0 4 1
A setShipCountManned() 0 6 1
A setLogins24h() 0 6 1
A getFlightSig24h() 0 4 1
A setFlightSigSystem24h() 0 6 1
A getKnCount() 0 4 1
A getFlightSigSystem24h() 0 4 1
A setShipCountNpc() 0 6 1
A setShipCount() 0 6 1
A getLogins24h() 0 4 1
A setInactiveCount() 0 6 1
A __toString() 0 7 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\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
    #[OneToOne(targetEntity: 'GameTurn')]
62
    #[JoinColumn(name: 'turn_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
63
    private GameTurnInterface $turn;
64
65
    #[Override]
66
    public function getId(): int
67
    {
68
        return $this->id;
69
    }
70
71
    #[Override]
72
    public function getTurn(): GameTurnInterface
73
    {
74
        return $this->turn;
75
    }
76
77
    #[Override]
78
    public function setTurn(GameTurnInterface $turn): GameTurnStatsInterface
79
    {
80
        $this->turn = $turn;
81
        return $this;
82
    }
83
84
    #[Override]
85
    public function getUserCount(): int
86
    {
87
        return $this->user_count;
88
    }
89
90
    #[Override]
91
    public function setUserCount(int $userCount): GameTurnStatsInterface
92
    {
93
        $this->user_count = $userCount;
94
95
        return $this;
96
    }
97
98
    #[Override]
99
    public function getLogins24h(): int
100
    {
101
        return $this->logins_24h;
102
    }
103
104
    #[Override]
105
    public function setLogins24h(int $logins24h): GameTurnStatsInterface
106
    {
107
        $this->logins_24h = $logins24h;
108
109
        return $this;
110
    }
111
112
    #[Override]
113
    public function getInactiveCount(): int
114
    {
115
        return $this->inactive_count;
116
    }
117
118
    #[Override]
119
    public function setInactiveCount(int $inactiveCount): GameTurnStatsInterface
120
    {
121
        $this->inactive_count = $inactiveCount;
122
123
        return $this;
124
    }
125
126
    #[Override]
127
    public function getVacationCount(): int
128
    {
129
        return $this->vacation_count;
130
    }
131
132
    #[Override]
133
    public function setVacationCount(int $vacationCount): GameTurnStatsInterface
134
    {
135
        $this->vacation_count = $vacationCount;
136
137
        return $this;
138
    }
139
140
    #[Override]
141
    public function getShipCount(): int
142
    {
143
        return $this->ship_count;
144
    }
145
146
    #[Override]
147
    public function setShipCount(int $shipCount): GameTurnStatsInterface
148
    {
149
        $this->ship_count = $shipCount;
150
151
        return $this;
152
    }
153
154
    #[Override]
155
    public function getShipCountManned(): int
156
    {
157
        return $this->ship_count_manned;
158
    }
159
160
    #[Override]
161
    public function setShipCountManned(int $shipCountManned): GameTurnStatsInterface
162
    {
163
        $this->ship_count_manned = $shipCountManned;
164
165
        return $this;
166
    }
167
168
    #[Override]
169
    public function getShipCountNpc(): int
170
    {
171
        return $this->ship_count_npc;
172
    }
173
174
    #[Override]
175
    public function setShipCountNpc(int $shipCountNpc): GameTurnStatsInterface
176
    {
177
        $this->ship_count_npc = $shipCountNpc;
178
179
        return $this;
180
    }
181
182
    #[Override]
183
    public function getKnCount(): int
184
    {
185
        return $this->kn_count;
186
    }
187
188
    #[Override]
189
    public function setKnCount(int $knCount): GameTurnStatsInterface
190
    {
191
        $this->kn_count = $knCount;
192
193
        return $this;
194
    }
195
196
    #[Override]
197
    public function getFlightSig24h(): int
198
    {
199
        return $this->flight_sig_24h;
200
    }
201
202
    #[Override]
203
    public function setFlightSig24h(int $flightSig24h): GameTurnStatsInterface
204
    {
205
        $this->flight_sig_24h = $flightSig24h;
206
207
        return $this;
208
    }
209
210
    #[Override]
211
    public function getFlightSigSystem24h(): int
212
    {
213
        return $this->flight_sig_system_24h;
214
    }
215
216
    #[Override]
217
    public function setFlightSigSystem24h(int $flightSigSystem24h): GameTurnStatsInterface
218
    {
219
        $this->flight_sig_system_24h = $flightSigSystem24h;
220
221
        return $this;
222
    }
223
224
    #[Override]
225
    public function __toString(): string
226
    {
227
        return sprintf(
228
            'id: %s, turnId: %s',
229
            $this->id,
230
            $this->turn_id
231
        );
232
    }
233
}
234