1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Message Forum |
5
|
|
|
* |
6
|
|
|
* @author Noé Zufferey |
7
|
|
|
* @copyright Expansion - le jeu |
8
|
|
|
* |
9
|
|
|
* @package Demeter |
10
|
|
|
* @update 06.10.13 |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
namespace Asylamba\Modules\Demeter\Model; |
14
|
|
|
|
15
|
|
|
class Color { |
16
|
|
|
# Regime |
17
|
|
|
const DEMOCRATIC = 1; |
18
|
|
|
const ROYALISTIC = 2; |
19
|
|
|
const THEOCRATIC = 3; |
20
|
|
|
|
21
|
|
|
# Relation avec les autres factions |
22
|
|
|
const NEUTRAL = 0; |
23
|
|
|
const PEACE = 1; |
24
|
|
|
const ALLY = 2; |
25
|
|
|
const ENEMY = 3; |
26
|
|
|
|
27
|
|
|
# constantes de prestiges |
28
|
|
|
const TWO_POINTS_PER_LEVEL = 2; |
29
|
|
|
const FOUR_POINTS_PER_LEVEL = 4; |
30
|
|
|
## empire |
31
|
|
|
const POINTCONQUER = 100; |
32
|
|
|
const POINTBUILDBIGSHIP = 25; |
33
|
|
|
|
34
|
|
|
## negore |
35
|
|
|
const MIN_PRICE = 10000; |
36
|
|
|
const COEF_POINT_SELLING = 0.00002; # == * 50K |
37
|
|
|
|
38
|
|
|
## cardan |
39
|
|
|
const BONUSOUTOFSECTOR = 20; |
40
|
|
|
const POINTDONATE = 10; |
41
|
|
|
const COEFPOINTDONATE = 0.0001; |
42
|
|
|
|
43
|
|
|
## kovakh |
44
|
|
|
const POINTBUILDLITTLESHIP = 1; |
45
|
|
|
const POINTCHANGETYPE = 50; |
46
|
|
|
const POINT_BATTLE_WIN = 10; |
47
|
|
|
const POINT_BATTLE_LOOSE = 20; |
48
|
|
|
|
49
|
|
|
## Synelle |
50
|
|
|
const POINTDEFEND = 20; |
51
|
|
|
|
52
|
|
|
## Nerve |
53
|
|
|
const COEFFPOINTCONQUER = 10; |
54
|
|
|
// POINTCHANGETYPE aussi |
55
|
|
|
|
56
|
|
|
## Aphéra |
57
|
|
|
const POINTSPY = 10; |
58
|
|
|
const POINTRESEARCH = 2; |
59
|
|
|
|
60
|
|
|
# const |
61
|
|
|
const NBRGOVERNMENT = 6; |
62
|
|
|
|
63
|
|
|
const CAMPAIGNTIME = 345600; |
64
|
|
|
const ELECTIONTIME = 172800; |
65
|
|
|
const PUTSCHTIME = 25200; |
66
|
|
|
|
67
|
|
|
const PUTSCHPERCENTAGE = 15; |
68
|
|
|
|
69
|
|
|
const ALIVE = 1; |
70
|
|
|
const DEAD = 0; |
71
|
|
|
|
72
|
|
|
const MANDATE = 1; |
73
|
|
|
const CAMPAIGN = 2; |
74
|
|
|
const ELECTION = 3; |
75
|
|
|
|
76
|
|
|
const NOT_WIN = 0; |
77
|
|
|
const WIN = 1; |
78
|
|
|
|
79
|
|
|
# attributs issus de la db |
80
|
|
|
public $id = 0; |
81
|
|
|
public $alive = 0; |
82
|
|
|
public $isWinner = 0; |
83
|
|
|
public $credits = 0; |
84
|
|
|
public $players = 0; |
85
|
|
|
public $activePlayers = 0; |
86
|
|
|
public $rankingPoints = 0; |
87
|
|
|
public $points = 0; |
88
|
|
|
public $sectors = 0; |
89
|
|
|
public $electionStatement = 0; |
90
|
|
|
public $isClosed = 0; |
91
|
|
|
public $description = 0; |
92
|
|
|
public $dClaimVictory = ''; |
93
|
|
|
public $dLastElection = ''; |
94
|
|
|
public $isInGame = 0; |
95
|
|
|
|
96
|
|
|
# attributs issus des resources |
97
|
|
|
public $officialName = ''; |
98
|
|
|
public $popularName = ''; |
99
|
|
|
public $government = ''; |
100
|
|
|
public $demonym = ''; |
101
|
|
|
public $factionPoint = ''; |
102
|
|
|
public $status = ['']; |
103
|
|
|
public $regime = 0; |
104
|
|
|
public $devise = ''; |
105
|
|
|
public $desc1 = ''; |
106
|
|
|
public $desc2 = ''; |
107
|
|
|
public $desc3 = ''; |
108
|
|
|
public $desc4 = ''; |
109
|
|
|
public $bonus = []; # array des id des bonus |
110
|
|
|
public $mandateDuration = 0; |
111
|
|
|
public $senateDesc = ''; |
112
|
|
|
public $campaignDesc = ''; |
113
|
|
|
|
114
|
|
|
public $bonusText = ['']; # array des descriptions des bonus |
115
|
|
|
|
116
|
|
|
public $colorLink = []; |
117
|
|
|
|
118
|
|
|
public $chiefId = 0; |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @return int |
122
|
|
|
*/ |
123
|
|
|
public function getId() |
124
|
|
|
{ |
125
|
|
|
return $this->id; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @param int $id |
130
|
|
|
* @return $this |
131
|
|
|
*/ |
132
|
|
|
public function setId($id) |
133
|
|
|
{ |
134
|
|
|
$this->id = $id; |
135
|
|
|
|
136
|
|
|
return $this; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* @return bool |
141
|
|
|
*/ |
142
|
|
|
public function getAlive() |
143
|
|
|
{ |
144
|
|
|
return $this->alive; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* @param bool $alive |
149
|
|
|
* @return $this |
150
|
|
|
*/ |
151
|
|
|
public function setAlive($alive) |
152
|
|
|
{ |
153
|
|
|
$this->alive = $alive; |
|
|
|
|
154
|
|
|
|
155
|
|
|
return $this; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @return bool |
160
|
|
|
*/ |
161
|
|
|
public function getIsWinner() |
162
|
|
|
{ |
163
|
|
|
return $this->isWinner; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @param bool $isWinner |
168
|
|
|
* @return $this |
169
|
|
|
*/ |
170
|
|
|
public function setIsWinner($isWinner) |
171
|
|
|
{ |
172
|
|
|
$this->isWinner = $isWinner; |
|
|
|
|
173
|
|
|
|
174
|
|
|
return $this; |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* @return int |
179
|
|
|
*/ |
180
|
|
|
public function getCredits() |
181
|
|
|
{ |
182
|
|
|
return $this->credits; |
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* @param int $credits |
187
|
|
|
* @return $this |
188
|
|
|
*/ |
189
|
|
|
public function setCredits($credits) |
190
|
|
|
{ |
191
|
|
|
$this->credits = $credits; |
192
|
|
|
|
193
|
|
|
return $this; |
194
|
|
|
} |
195
|
|
|
|
196
|
|
|
/** |
197
|
|
|
* @return array |
198
|
|
|
*/ |
199
|
|
|
public function getPlayers() |
200
|
|
|
{ |
201
|
|
|
return $this->players; |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @param array $players |
206
|
|
|
* @return $this |
207
|
|
|
*/ |
208
|
|
|
public function setPlayers($players) |
209
|
|
|
{ |
210
|
|
|
$this->players = $players; |
|
|
|
|
211
|
|
|
|
212
|
|
|
return $this; |
213
|
|
|
} |
214
|
|
|
/** |
215
|
|
|
* @param int $idPlayer |
216
|
|
|
* @return $this |
217
|
|
|
*/ |
218
|
|
|
public function addPlayer($idPlayer) |
|
|
|
|
219
|
|
|
{ |
220
|
|
|
//Kern je sais pas s'il le faut, et je sais pas comment l'écrire mais j'hésite avec le setPplayers je sais pas si on set tout d'un coup ou si c'est plutot par ajout |
221
|
|
|
$this->players = players; |
222
|
|
|
|
223
|
|
|
return $this; |
224
|
|
|
} |
225
|
|
|
|
226
|
|
|
//Kern je connais pas le type non plus, je suppose que c'est un tableau d'int avec les id |
227
|
|
|
/** |
228
|
|
|
* @return array |
229
|
|
|
*/ |
230
|
|
|
public function getActivePlayers() |
231
|
|
|
{ |
232
|
|
|
return $this->activePlayers; |
233
|
|
|
} |
234
|
|
|
|
235
|
|
|
/** |
236
|
|
|
* @param array $activePlayers |
237
|
|
|
* @return $this |
238
|
|
|
*/ |
239
|
|
|
public function setActivePlayers($activePlayers) |
240
|
|
|
{ |
241
|
|
|
$this->activePlayers = $activePlayers; |
|
|
|
|
242
|
|
|
|
243
|
|
|
return $this; |
244
|
|
|
} |
245
|
|
|
|
246
|
|
|
/** |
247
|
|
|
* @return int |
248
|
|
|
*/ |
249
|
|
|
public function getRankingPoints() |
250
|
|
|
{ |
251
|
|
|
return $this->rankingPoints; |
252
|
|
|
} |
253
|
|
|
|
254
|
|
|
/** |
255
|
|
|
* @param int $rankingPoints |
256
|
|
|
* @return $this |
257
|
|
|
*/ |
258
|
|
|
public function setRankingPoints($rankingPoints) |
259
|
|
|
{ |
260
|
|
|
$this->rankingPoints = $rankingPoints; |
261
|
|
|
|
262
|
|
|
return $this; |
263
|
|
|
} |
264
|
|
|
|
265
|
|
|
/** |
266
|
|
|
* @return int |
267
|
|
|
*/ |
268
|
|
|
public function getPoints() |
269
|
|
|
{ |
270
|
|
|
return $this->points; |
271
|
|
|
} |
272
|
|
|
|
273
|
|
|
/** |
274
|
|
|
* @param int $points |
275
|
|
|
* @return $this |
276
|
|
|
*/ |
277
|
|
|
public function setPoints($points) |
278
|
|
|
{ |
279
|
|
|
$this->points = $points; |
280
|
|
|
|
281
|
|
|
return $this; |
282
|
|
|
} |
283
|
|
|
|
284
|
|
|
/** |
285
|
|
|
* @return array |
286
|
|
|
*/ |
287
|
|
|
public function getSectors() |
288
|
|
|
{ |
289
|
|
|
return $this->id; |
290
|
|
|
} |
291
|
|
|
|
292
|
|
|
/** |
293
|
|
|
* @param array $sectors |
294
|
|
|
* @return $this |
295
|
|
|
*/ |
296
|
|
|
public function setSectors($sectors) |
297
|
|
|
{ |
298
|
|
|
$this->sectors = $sectors; |
|
|
|
|
299
|
|
|
|
300
|
|
|
return $this; |
301
|
|
|
} |
302
|
|
|
|
303
|
|
|
/** |
304
|
|
|
* @return int |
305
|
|
|
*/ |
306
|
|
|
public function getElectionStatement() |
307
|
|
|
{ |
308
|
|
|
return $this->electionStatement; |
309
|
|
|
} |
310
|
|
|
|
311
|
|
|
/** |
312
|
|
|
* @param int $electionStatement |
313
|
|
|
* @return $this |
314
|
|
|
*/ |
315
|
|
|
public function setElectionStatement($electionStatement) |
316
|
|
|
{ |
317
|
|
|
$this->electionStatement = $electionStatement; |
318
|
|
|
|
319
|
|
|
return $this; |
320
|
|
|
} |
321
|
|
|
|
322
|
|
|
/** |
323
|
|
|
* @return bool |
324
|
|
|
*/ |
325
|
|
|
public function getIsClosed() |
326
|
|
|
{ |
327
|
|
|
return $this->isClosed; |
328
|
|
|
} |
329
|
|
|
|
330
|
|
|
/** |
331
|
|
|
* @param bool $isClosed |
332
|
|
|
* @return $this |
333
|
|
|
*/ |
334
|
|
|
public function setIsClosed($isClosed) |
335
|
|
|
{ |
336
|
|
|
$this->isClosed = $isClosed; |
|
|
|
|
337
|
|
|
|
338
|
|
|
return $this; |
339
|
|
|
} |
340
|
|
|
|
341
|
|
|
/** |
342
|
|
|
* @return string |
343
|
|
|
*/ |
344
|
|
|
public function getDescription() |
345
|
|
|
{ |
346
|
|
|
return $this->description; |
347
|
|
|
} |
348
|
|
|
//Kern je me base sur les valeurs par défaut mais ça me semble bizarre : public $description= 0; |
349
|
|
|
/** |
350
|
|
|
* @param int $description |
351
|
|
|
* @return $this |
352
|
|
|
*/ |
353
|
|
|
public function setDescription($description) |
354
|
|
|
{ |
355
|
|
|
$this->description = $description; |
356
|
|
|
|
357
|
|
|
return $this; |
358
|
|
|
} |
359
|
|
|
//Kern Pareil ici : public $dClaimVictory = ''; |
360
|
|
|
/** |
361
|
|
|
* @return string |
362
|
|
|
*/ |
363
|
|
|
public function getDClaimVictory() |
364
|
|
|
{ |
365
|
|
|
return $this->dClaimVictory; |
366
|
|
|
} |
367
|
|
|
|
368
|
|
|
/** |
369
|
|
|
* @param string $dClaimVictory |
370
|
|
|
* @return $this |
371
|
|
|
*/ |
372
|
|
|
public function setDClaimVictory($dClaimVictory) |
373
|
|
|
{ |
374
|
|
|
$this->dClaimVictory = $dClaimVictory; |
375
|
|
|
|
376
|
|
|
return $this; |
377
|
|
|
} |
378
|
|
|
|
379
|
|
|
/** |
380
|
|
|
* @return string |
381
|
|
|
*/ |
382
|
|
|
public function getDLastElection() |
383
|
|
|
{ |
384
|
|
|
return $this->dLastElection; |
385
|
|
|
} |
386
|
|
|
|
387
|
|
|
/** |
388
|
|
|
* @param string $dLastElection |
389
|
|
|
* @return $this |
390
|
|
|
*/ |
391
|
|
|
public function setDLastElection($dLastElection) |
392
|
|
|
{ |
393
|
|
|
$this->dLastElection = $dLastElection; |
394
|
|
|
|
395
|
|
|
return $this; |
396
|
|
|
} |
397
|
|
|
|
398
|
|
|
/** |
399
|
|
|
* @return int |
400
|
|
|
*/ |
401
|
|
|
public function getIsInGame() |
402
|
|
|
{ |
403
|
|
|
return $this->isInGame; |
404
|
|
|
} |
405
|
|
|
|
406
|
|
|
/** |
407
|
|
|
* @param int $isInGame |
408
|
|
|
* @return $this |
409
|
|
|
*/ |
410
|
|
|
public function setIsInGame($isInGame) |
411
|
|
|
{ |
412
|
|
|
$this->isInGame = $isInGame; |
413
|
|
|
|
414
|
|
|
return $this; |
415
|
|
|
} |
416
|
|
|
|
417
|
|
|
/** |
418
|
|
|
* @return string |
419
|
|
|
*/ |
420
|
|
|
public function getOfficialName() |
421
|
|
|
{ |
422
|
|
|
return $this->officialName; |
423
|
|
|
} |
424
|
|
|
|
425
|
|
|
/** |
426
|
|
|
* @param string $officialName |
427
|
|
|
* @return $this |
428
|
|
|
*/ |
429
|
|
|
public function setOfficialName($officialName) |
430
|
|
|
{ |
431
|
|
|
$this->officialName = $officialName; |
432
|
|
|
|
433
|
|
|
return $this; |
434
|
|
|
} |
435
|
|
|
|
436
|
|
|
/** |
437
|
|
|
* @return string |
438
|
|
|
*/ |
439
|
|
|
public function getPopularName() |
440
|
|
|
{ |
441
|
|
|
return $this->popularName; |
442
|
|
|
} |
443
|
|
|
|
444
|
|
|
/** |
445
|
|
|
* @param string $popularName |
446
|
|
|
* @return $this |
447
|
|
|
*/ |
448
|
|
|
public function setPopularName($popularName) |
449
|
|
|
{ |
450
|
|
|
$this->popularName = $popularName; |
451
|
|
|
|
452
|
|
|
return $this; |
453
|
|
|
} |
454
|
|
|
|
455
|
|
|
/** |
456
|
|
|
* @return string |
457
|
|
|
*/ |
458
|
|
|
public function getGovernment() |
459
|
|
|
{ |
460
|
|
|
return $this->government; |
461
|
|
|
} |
462
|
|
|
|
463
|
|
|
/** |
464
|
|
|
* @param string $government |
465
|
|
|
* @return $this |
466
|
|
|
*/ |
467
|
|
|
public function setGovernment($government) |
468
|
|
|
{ |
469
|
|
|
$this->government = $government; |
470
|
|
|
|
471
|
|
|
return $this; |
472
|
|
|
} |
473
|
|
|
|
474
|
|
|
/** |
475
|
|
|
* @return string |
476
|
|
|
*/ |
477
|
|
|
public function getDemonym() |
478
|
|
|
{ |
479
|
|
|
return $this->demonym; |
480
|
|
|
} |
481
|
|
|
|
482
|
|
|
/** |
483
|
|
|
* @param string $demonym |
484
|
|
|
* @return $this |
485
|
|
|
*/ |
486
|
|
|
public function setDemonym($demonym) |
487
|
|
|
{ |
488
|
|
|
$this->demonym = $demonym; |
489
|
|
|
|
490
|
|
|
return $this; |
491
|
|
|
} |
492
|
|
|
|
493
|
|
|
/** |
494
|
|
|
* @return string |
495
|
|
|
*/ |
496
|
|
|
public function getFactionPoint() |
497
|
|
|
{ |
498
|
|
|
return $this->factionPoint; |
499
|
|
|
} |
500
|
|
|
|
501
|
|
|
/** |
502
|
|
|
* @param string $factionPoint |
503
|
|
|
* @return $this |
504
|
|
|
*/ |
505
|
|
|
public function setFactionPoint($factionPoint) |
506
|
|
|
{ |
507
|
|
|
$this->factionPoint = $factionPoint; |
508
|
|
|
|
509
|
|
|
return $this; |
510
|
|
|
} |
511
|
|
|
|
512
|
|
|
/** |
513
|
|
|
* @return array |
514
|
|
|
*/ |
515
|
|
|
public function getStatus() |
516
|
|
|
{ |
517
|
|
|
return $this->status; |
518
|
|
|
} |
519
|
|
|
|
520
|
|
|
/** |
521
|
|
|
* @param array $status |
522
|
|
|
* @return $this |
523
|
|
|
*/ |
524
|
|
|
public function setStatus($status) |
525
|
|
|
{ |
526
|
|
|
$this->status = $status; |
527
|
|
|
|
528
|
|
|
return $this; |
529
|
|
|
} |
530
|
|
|
|
531
|
|
|
/** |
532
|
|
|
* @return int |
533
|
|
|
*/ |
534
|
|
|
public function getRegime() |
535
|
|
|
{ |
536
|
|
|
return $this->regime; |
537
|
|
|
} |
538
|
|
|
|
539
|
|
|
/** |
540
|
|
|
* @param int $regime |
541
|
|
|
* @return $this |
542
|
|
|
*/ |
543
|
|
|
public function setRegime($regime) |
544
|
|
|
{ |
545
|
|
|
$this->regime = $regime; |
546
|
|
|
|
547
|
|
|
return $this; |
548
|
|
|
} |
549
|
|
|
|
550
|
|
|
/** |
551
|
|
|
* @return string |
552
|
|
|
*/ |
553
|
|
|
public function getDevise() |
554
|
|
|
{ |
555
|
|
|
return $this->devise; |
556
|
|
|
} |
557
|
|
|
|
558
|
|
|
/** |
559
|
|
|
* @param string $devise |
560
|
|
|
* @return $this |
561
|
|
|
*/ |
562
|
|
|
public function setDevise($devise ) |
|
|
|
|
563
|
|
|
{ |
564
|
|
|
$this->devise = $devise ; |
565
|
|
|
|
566
|
|
|
return $this; |
567
|
|
|
} |
568
|
|
|
|
569
|
|
|
/** |
570
|
|
|
* @return string |
571
|
|
|
*/ |
572
|
|
|
public function getDesc1() |
573
|
|
|
{ |
574
|
|
|
return $this->desc1; |
575
|
|
|
} |
576
|
|
|
|
577
|
|
|
/** |
578
|
|
|
* @param string $desc1 |
579
|
|
|
* @return $this |
580
|
|
|
*/ |
581
|
|
|
public function setDesc1($desc1) |
582
|
|
|
{ |
583
|
|
|
$this->desc1 = $desc1; |
584
|
|
|
|
585
|
|
|
return $this; |
586
|
|
|
} |
587
|
|
|
|
588
|
|
|
/** |
589
|
|
|
* @return string |
590
|
|
|
*/ |
591
|
|
|
public function getDesc2() |
592
|
|
|
{ |
593
|
|
|
return $this->desc2; |
594
|
|
|
} |
595
|
|
|
|
596
|
|
|
/** |
597
|
|
|
* @param string $desc2 |
598
|
|
|
* @return $this |
599
|
|
|
*/ |
600
|
|
|
public function setDesc2($desc2) |
601
|
|
|
{ |
602
|
|
|
$this->desc2 = $desc2; |
603
|
|
|
|
604
|
|
|
return $this; |
605
|
|
|
} |
606
|
|
|
|
607
|
|
|
/** |
608
|
|
|
* @return string |
609
|
|
|
*/ |
610
|
|
|
public function getDesc3() |
611
|
|
|
{ |
612
|
|
|
return $this->desc3; |
613
|
|
|
} |
614
|
|
|
|
615
|
|
|
/** |
616
|
|
|
* @param string $desc3 |
617
|
|
|
* @return $this |
618
|
|
|
*/ |
619
|
|
|
public function setDesc3($desc3) |
620
|
|
|
{ |
621
|
|
|
$this->desc3 = $desc3; |
622
|
|
|
|
623
|
|
|
return $this; |
624
|
|
|
} |
625
|
|
|
|
626
|
|
|
/** |
627
|
|
|
* @return string |
628
|
|
|
*/ |
629
|
|
|
public function getDesc4() |
630
|
|
|
{ |
631
|
|
|
return $this->desc4; |
632
|
|
|
} |
633
|
|
|
|
634
|
|
|
/** |
635
|
|
|
* @param string $desc4 |
636
|
|
|
* @return $this |
637
|
|
|
*/ |
638
|
|
|
public function setDesc4($desc4) |
639
|
|
|
{ |
640
|
|
|
$this->desc4 = $desc4; |
641
|
|
|
|
642
|
|
|
return $this; |
643
|
|
|
} |
644
|
|
|
|
645
|
|
|
/** |
646
|
|
|
* @return array |
647
|
|
|
*/ |
648
|
|
|
public function getBonus() |
649
|
|
|
{ |
650
|
|
|
return $this->bonus; |
651
|
|
|
} |
652
|
|
|
|
653
|
|
|
/** |
654
|
|
|
* @param array $bonus |
655
|
|
|
* @return $this |
656
|
|
|
*/ |
657
|
|
|
public function setBonus($bonus) |
658
|
|
|
{ |
659
|
|
|
$this->bonus = $bonus; |
660
|
|
|
|
661
|
|
|
return $this; |
662
|
|
|
} |
663
|
|
|
|
664
|
|
|
/** |
665
|
|
|
* @return int |
666
|
|
|
*/ |
667
|
|
|
public function getMandateDuration() |
668
|
|
|
{ |
669
|
|
|
return $this->mandateDuration; |
670
|
|
|
} |
671
|
|
|
|
672
|
|
|
/** |
673
|
|
|
* @param int $mandateDuration |
674
|
|
|
* @return $this |
675
|
|
|
*/ |
676
|
|
|
public function setMandateDuration($mandateDuration) |
677
|
|
|
{ |
678
|
|
|
$this->mandateDuration = $mandateDuration; |
679
|
|
|
|
680
|
|
|
return $this; |
681
|
|
|
} |
682
|
|
|
|
683
|
|
|
/** |
684
|
|
|
* @return string |
685
|
|
|
*/ |
686
|
|
|
public function getSenateDesc() |
687
|
|
|
{ |
688
|
|
|
return $this->senateDesc; |
689
|
|
|
} |
690
|
|
|
|
691
|
|
|
/** |
692
|
|
|
* @param string $senateDesc |
693
|
|
|
* @return $this |
694
|
|
|
*/ |
695
|
|
|
public function setSenateDesc($senateDesc) |
696
|
|
|
{ |
697
|
|
|
$this->senateDesc = $senateDesc; |
698
|
|
|
|
699
|
|
|
return $this; |
700
|
|
|
} |
701
|
|
|
|
702
|
|
|
/** |
703
|
|
|
* @return int |
704
|
|
|
*/ |
705
|
|
|
public function getCampaignDesc() |
706
|
|
|
{ |
707
|
|
|
return $this->campaignDesc; |
708
|
|
|
} |
709
|
|
|
|
710
|
|
|
/** |
711
|
|
|
* @param int $campaignDesc |
712
|
|
|
* @return $this |
713
|
|
|
*/ |
714
|
|
|
public function setCampaignDesc($campaignDesc) |
715
|
|
|
{ |
716
|
|
|
$this->campaignDesc = $campaignDesc; |
|
|
|
|
717
|
|
|
|
718
|
|
|
return $this; |
719
|
|
|
} |
720
|
|
|
|
721
|
|
|
/** |
722
|
|
|
* @return array |
723
|
|
|
*/ |
724
|
|
|
public function getBonusText() |
725
|
|
|
{ |
726
|
|
|
return $this->bonusText; |
727
|
|
|
} |
728
|
|
|
|
729
|
|
|
/** |
730
|
|
|
* @param array $bonusText |
731
|
|
|
* @return $this |
732
|
|
|
*/ |
733
|
|
|
public function SetBonusText($bonusText ) |
|
|
|
|
734
|
|
|
{ |
735
|
|
|
$this->bonusText = $bonusText ; |
736
|
|
|
|
737
|
|
|
return $this; |
738
|
|
|
} |
739
|
|
|
|
740
|
|
|
/** |
741
|
|
|
* @return array |
742
|
|
|
*/ |
743
|
|
|
public function getColorLink() |
744
|
|
|
{ |
745
|
|
|
return $this->colorLink; |
746
|
|
|
} |
747
|
|
|
|
748
|
|
|
/** |
749
|
|
|
* @param array $colorLink |
750
|
|
|
* @return $this |
751
|
|
|
*/ |
752
|
|
|
public function setColorLink($colorLink) |
753
|
|
|
{ |
754
|
|
|
$this->colorLink = $colorLink; |
755
|
|
|
|
756
|
|
|
return $this; |
757
|
|
|
} |
758
|
|
|
|
759
|
|
|
/** |
760
|
|
|
* @return int |
761
|
|
|
*/ |
762
|
|
|
public function getChiefId() |
763
|
|
|
{ |
764
|
|
|
return $this->chiefId; |
765
|
|
|
} |
766
|
|
|
|
767
|
|
|
/** |
768
|
|
|
* @param int $chiefId |
769
|
|
|
* @return $this |
770
|
|
|
*/ |
771
|
|
|
public function setChiefId($chiefId) |
772
|
|
|
{ |
773
|
|
|
$this->chiefId = $chiefId; |
774
|
|
|
|
775
|
|
|
return $this; |
776
|
|
|
} |
777
|
|
|
|
778
|
|
|
/** |
779
|
|
|
* @param int $credit |
780
|
|
|
*/ |
781
|
|
|
public function increaseCredit($credit) { |
782
|
|
|
$this->credits += $credit; |
783
|
|
|
return $this->credits; |
784
|
|
|
} |
785
|
|
|
|
786
|
|
|
/** |
787
|
|
|
* @param int $credit |
788
|
|
|
*/ |
789
|
|
|
public function decreaseCredit($credit) { |
790
|
|
|
$this->credits -= $credit; |
791
|
|
|
return $this->credits; |
792
|
|
|
} |
793
|
|
|
} |
794
|
|
|
|
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.