Passed
Push — dev ( ac26ef...6b8aca )
by Nico
08:29
created

ShipRumpModuleLevel::getModuleLevel11Max()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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\Table;
13
14
/**
15
 * @Entity(repositoryClass="Stu\Orm\Repository\ShipRumpModuleLevelRepository")
16
 * @Table(
17
 *     name="stu_rumps_module_level",
18
 *     indexes={
19
 *         @Index(name="rump_module_level_ship_rump_idx", columns={"rump_id"})
20
 *     }
21
 * )
22
 **/
23
class ShipRumpModuleLevel implements ShipRumpModuleLevelInterface
24
{
25
    /**
26
     * @Id
27
     * @Column(type="integer")
28
     * @GeneratedValue(strategy="IDENTITY")
29
     *
30
     */
31
    private int $id;
32
33
    /**
34
     * @Column(type="integer")
35
     *
36
     */
37
    private int $rump_id = 0;
38
39
    /**
40
     * @Column(type="smallint")
41
     *
42
     */
43
    private int $module_level_1 = 0;
44
45
    /**
46
     * @Column(type="smallint")
47
     *
48
     */
49
    private int $module_mandatory_1 = 0;
50
51
    /**
52
     * @Column(type="smallint")
53
     *
54
     */
55
    private int $module_level_1_min = 0;
56
57
    /**
58
     * @Column(type="smallint")
59
     *
60
     */
61
    private int $module_level_1_max = 0;
62
63
    /**
64
     * @Column(type="smallint")
65
     *
66
     */
67
    private int $module_level_2 = 0;
68
69
    /**
70
     * @Column(type="smallint")
71
     *
72
     */
73
    private int $module_mandatory_2 = 0;
74
75
    /**
76
     * @Column(type="smallint")
77
     *
78
     */
79
    private int $module_level_2_min = 0;
80
81
    /**
82
     * @Column(type="smallint")
83
     *
84
     */
85
    private int $module_level_2_max = 0;
86
87
    /**
88
     * @Column(type="smallint")
89
     *
90
     */
91
    private int $module_level_3 = 0;
92
93
    /**
94
     * @Column(type="smallint")
95
     *
96
     */
97
    private int $module_mandatory_3 = 0;
98
99
    /**
100
     * @Column(type="smallint")
101
     *
102
     */
103
    private int $module_level_3_min = 0;
104
105
    /**
106
     * @Column(type="smallint")
107
     *
108
     */
109
    private int $module_level_3_max = 0;
110
111
    /**
112
     * @Column(type="smallint")
113
     *
114
     */
115
    private int $module_level_4 = 0;
116
117
    /**
118
     * @Column(type="smallint")
119
     *
120
     */
121
    private int $module_mandatory_4 = 0;
122
123
    /**
124
     * @Column(type="smallint")
125
     *
126
     */
127
    private int $module_level_4_min = 0;
128
129
    /**
130
     * @Column(type="smallint")
131
     *
132
     */
133
    private int $module_level_4_max = 0;
134
135
    /**
136
     * @Column(type="smallint")
137
     *
138
     */
139
    private int $module_level_5 = 0;
140
141
    /**
142
     * @Column(type="smallint")
143
     *
144
     */
145
    private int $module_mandatory_5 = 0;
146
147
    /**
148
     * @Column(type="smallint")
149
     *
150
     */
151
    private int $module_level_5_min = 0;
152
153
    /**
154
     * @Column(type="smallint")
155
     *
156
     */
157
    private int $module_level_5_max = 0;
158
159
    /**
160
     * @Column(type="smallint")
161
     *
162
     */
163
    private int $module_level_6 = 0;
164
165
    /**
166
     * @Column(type="smallint")
167
     *
168
     */
169
    private int $module_mandatory_6 = 0;
170
171
    /**
172
     * @Column(type="smallint")
173
     *
174
     */
175
    private int $module_level_6_min = 0;
176
177
    /**
178
     * @Column(type="smallint")
179
     *
180
     */
181
    private int $module_level_6_max = 0;
182
183
    /**
184
     * @Column(type="smallint")
185
     *
186
     */
187
    private int $module_level_7 = 0;
188
189
    /**
190
     * @Column(type="smallint")
191
     *
192
     */
193
    private int $module_mandatory_7 = 0;
194
195
    /**
196
     * @Column(type="smallint")
197
     *
198
     */
199
    private int $module_level_7_min = 0;
200
201
    /**
202
     * @Column(type="smallint")
203
     *
204
     */
205
    private int $module_level_7_max = 0;
206
207
    /**
208
     * @Column(type="smallint")
209
     *
210
     */
211
    private int $module_level_8 = 0;
212
213
    /**
214
     * @Column(type="smallint")
215
     *
216
     */
217
    private int $module_mandatory_8 = 0;
218
219
    /**
220
     * @Column(type="smallint")
221
     *
222
     */
223
    private int $module_level_8_min = 0;
224
225
    /**
226
     * @Column(type="smallint")
227
     *
228
     */
229
    private int $module_level_8_max = 0;
230
231
    /**
232
     * @Column(type="smallint", nullable=true)
233
     *
234
     */
235
    private ?int $module_level_11 = 0;
236
237
    /**
238
     * @Column(type="smallint", nullable=true)
239
     *
240
     */
241
    private ?int $module_mandatory_11 = 0;
242
243
    /**
244
     * @Column(type="smallint", nullable=true)
245
     *
246
     */
247
    private ?int $module_level_11_min = 0;
248
249
    /**
250
     * @Column(type="smallint", nullable=true)
251
     *
252
     */
253
    private ?int $module_level_11_max = 0;
254
255
    public function getId(): int
256
    {
257
        return $this->id;
258
    }
259
260
    public function getRumpId(): int
261
    {
262
        return $this->rump_id;
263
    }
264
265
    public function setRumpId(int $shipRumpId): ShipRumpModuleLevelInterface
266
    {
267
        $this->rump_id = $shipRumpId;
268
269
        return $this;
270
    }
271
272
    public function getModuleLevel1(): int
273
    {
274
        return $this->module_level_1;
275
    }
276
277
    public function setModuleLevel1(int $moduleLevel1): ShipRumpModuleLevelInterface
278
    {
279
        $this->module_level_1 = $moduleLevel1;
280
281
        return $this;
282
    }
283
284
    public function getModuleMandatory1(): int
285
    {
286
        return $this->module_mandatory_1;
287
    }
288
289
    public function setModuleMandatory1(int $moduleMandatory1): ShipRumpModuleLevelInterface
290
    {
291
        $this->module_mandatory_1 = $moduleMandatory1;
292
293
        return $this;
294
    }
295
296
    public function getModuleLevel1Min(): int
297
    {
298
        return $this->module_level_1_min;
299
    }
300
301
    public function setModuleLevel1Min(int $moduleLevel1Min): ShipRumpModuleLevelInterface
302
    {
303
        $this->module_level_1_min = $moduleLevel1Min;
304
305
        return $this;
306
    }
307
308
    public function getModuleLevel1Max(): int
309
    {
310
        return $this->module_level_1_max;
311
    }
312
313
    public function setModuleLevel1Max(int $moduleLevel1Max): ShipRumpModuleLevelInterface
314
    {
315
        $this->module_level_1_max = $moduleLevel1Max;
316
317
        return $this;
318
    }
319
320
    public function getModuleLevel2(): int
321
    {
322
        return $this->module_level_2;
323
    }
324
325
    public function setModuleLevel2(int $moduleLevel2): ShipRumpModuleLevelInterface
326
    {
327
        $this->module_level_2 = $moduleLevel2;
328
329
        return $this;
330
    }
331
332
    public function getModuleMandatory2(): int
333
    {
334
        return $this->module_mandatory_2;
335
    }
336
337
    public function setModuleMandatory2(int $moduleMandatory2): ShipRumpModuleLevelInterface
338
    {
339
        $this->module_mandatory_2 = $moduleMandatory2;
340
341
        return $this;
342
    }
343
344
    public function getModuleLevel2Min(): int
345
    {
346
        return $this->module_level_2_min;
347
    }
348
349
    public function setModuleLevel2Min(int $moduleLevel2Min): ShipRumpModuleLevelInterface
350
    {
351
        $this->module_level_2_min = $moduleLevel2Min;
352
353
        return $this;
354
    }
355
356
    public function getModuleLevel2Max(): int
357
    {
358
        return $this->module_level_2_max;
359
    }
360
361
    public function setModuleLevel2Max(int $moduleLevel2Max): ShipRumpModuleLevelInterface
362
    {
363
        $this->module_level_2_max = $moduleLevel2Max;
364
365
        return $this;
366
    }
367
368
    public function getModuleLevel3(): int
369
    {
370
        return $this->module_level_3;
371
    }
372
373
    public function setModuleLevel3(int $moduleLevel3): ShipRumpModuleLevelInterface
374
    {
375
        $this->module_level_3 = $moduleLevel3;
376
377
        return $this;
378
    }
379
380
    public function getModuleMandatory3(): int
381
    {
382
        return $this->module_mandatory_3;
383
    }
384
385
    public function setModuleMandatory3(int $moduleMandatory3): ShipRumpModuleLevelInterface
386
    {
387
        $this->module_mandatory_3 = $moduleMandatory3;
388
389
        return $this;
390
    }
391
392
    public function getModuleLevel3Min(): int
393
    {
394
        return $this->module_level_3_min;
395
    }
396
397
    public function setModuleLevel3Min(int $moduleLevel3Min): ShipRumpModuleLevelInterface
398
    {
399
        $this->module_level_3_min = $moduleLevel3Min;
400
401
        return $this;
402
    }
403
404
    public function getModuleLevel3Max(): int
405
    {
406
        return $this->module_level_3_max;
407
    }
408
409
    public function setModuleLevel3Max(int $moduleLevel3Max): ShipRumpModuleLevelInterface
410
    {
411
        $this->module_level_3_max = $moduleLevel3Max;
412
413
        return $this;
414
    }
415
416
    public function getModuleLevel4(): int
417
    {
418
        return $this->module_level_4;
419
    }
420
421
    public function setModuleLevel4(int $moduleLevel4): ShipRumpModuleLevelInterface
422
    {
423
        $this->module_level_4 = $moduleLevel4;
424
425
        return $this;
426
    }
427
428
    public function getModuleMandatory4(): int
429
    {
430
        return $this->module_mandatory_4;
431
    }
432
433
    public function setModuleMandatory4(int $moduleMandatory4): ShipRumpModuleLevelInterface
434
    {
435
        $this->module_mandatory_4 = $moduleMandatory4;
436
437
        return $this;
438
    }
439
440
    public function getModuleLevel4Min(): int
441
    {
442
        return $this->module_level_4_min;
443
    }
444
445
    public function setModuleLevel4Min(int $moduleLevel4Min): ShipRumpModuleLevelInterface
446
    {
447
        $this->module_level_4_min = $moduleLevel4Min;
448
449
        return $this;
450
    }
451
452
    public function getModuleLevel4Max(): int
453
    {
454
        return $this->module_level_4_max;
455
    }
456
457
    public function setModuleLevel4Max(int $moduleLevel4Max): ShipRumpModuleLevelInterface
458
    {
459
        $this->module_level_4_max = $moduleLevel4Max;
460
461
        return $this;
462
    }
463
464
    public function getModuleLevel5(): int
465
    {
466
        return $this->module_level_5;
467
    }
468
469
    public function setModuleLevel5(int $moduleLevel5): ShipRumpModuleLevelInterface
470
    {
471
        $this->module_level_5 = $moduleLevel5;
472
473
        return $this;
474
    }
475
476
    public function getModuleMandatory5(): int
477
    {
478
        return $this->module_mandatory_5;
479
    }
480
481
    public function setModuleMandatory5(int $moduleMandatory5): ShipRumpModuleLevelInterface
482
    {
483
        $this->module_mandatory_5 = $moduleMandatory5;
484
485
        return $this;
486
    }
487
488
    public function getModuleLevel5Min(): int
489
    {
490
        return $this->module_level_5_min;
491
    }
492
493
    public function setModuleLevel5Min(int $moduleLevel5Min): ShipRumpModuleLevelInterface
494
    {
495
        $this->module_level_5_min = $moduleLevel5Min;
496
497
        return $this;
498
    }
499
500
    public function getModuleLevel5Max(): int
501
    {
502
        return $this->module_level_5_max;
503
    }
504
505
    public function setModuleLevel5Max(int $moduleLevel5Max): ShipRumpModuleLevelInterface
506
    {
507
        $this->module_level_5_max = $moduleLevel5Max;
508
509
        return $this;
510
    }
511
512
    public function getModuleLevel6(): int
513
    {
514
        return $this->module_level_6;
515
    }
516
517
    public function setModuleLevel6(int $moduleLevel6): ShipRumpModuleLevelInterface
518
    {
519
        $this->module_level_6 = $moduleLevel6;
520
521
        return $this;
522
    }
523
524
    public function getModuleMandatory6(): int
525
    {
526
        return $this->module_mandatory_6;
527
    }
528
529
    public function setModuleMandatory6(int $moduleMandatory6): ShipRumpModuleLevelInterface
530
    {
531
        $this->module_mandatory_6 = $moduleMandatory6;
532
533
        return $this;
534
    }
535
536
    public function getModuleLevel6Min(): int
537
    {
538
        return $this->module_level_6_min;
539
    }
540
541
    public function setModuleLevel6Min(int $moduleLevel6Min): ShipRumpModuleLevelInterface
542
    {
543
        $this->module_level_6_min = $moduleLevel6Min;
544
545
        return $this;
546
    }
547
548
    public function getModuleLevel6Max(): int
549
    {
550
        return $this->module_level_6_max;
551
    }
552
553
    public function setModuleLevel6Max(int $moduleLevel6Max): ShipRumpModuleLevelInterface
554
    {
555
        $this->module_level_6_max = $moduleLevel6Max;
556
557
        return $this;
558
    }
559
560
    public function getModuleLevel7(): int
561
    {
562
        return $this->module_level_7;
563
    }
564
565
    public function setModuleLevel7(int $moduleLevel7): ShipRumpModuleLevelInterface
566
    {
567
        $this->module_level_7 = $moduleLevel7;
568
569
        return $this;
570
    }
571
572
    public function getModuleMandatory7(): int
573
    {
574
        return $this->module_mandatory_7;
575
    }
576
577
    public function setModuleMandatory7(int $moduleMandatory7): ShipRumpModuleLevelInterface
578
    {
579
        $this->module_mandatory_7 = $moduleMandatory7;
580
581
        return $this;
582
    }
583
584
    public function getModuleLevel7Min(): int
585
    {
586
        return $this->module_level_7_min;
587
    }
588
589
    public function setModuleLevel7Min(int $moduleLevel7Min): ShipRumpModuleLevelInterface
590
    {
591
        $this->module_level_7_min = $moduleLevel7Min;
592
593
        return $this;
594
    }
595
596
    public function getModuleLevel7Max(): int
597
    {
598
        return $this->module_level_7_max;
599
    }
600
601
    public function setModuleLevel7Max(int $moduleLevel7Max): ShipRumpModuleLevelInterface
602
    {
603
        $this->module_level_7_max = $moduleLevel7Max;
604
605
        return $this;
606
    }
607
608
    public function getModuleLevel8(): int
609
    {
610
        return $this->module_level_8;
611
    }
612
613
    public function setModuleLevel8(int $moduleLevel8): ShipRumpModuleLevelInterface
614
    {
615
        $this->module_level_8 = $moduleLevel8;
616
617
        return $this;
618
    }
619
620
    public function getModuleMandatory8(): int
621
    {
622
        return $this->module_mandatory_8;
623
    }
624
625
    public function setModuleMandatory8(int $moduleMandatory8): ShipRumpModuleLevelInterface
626
    {
627
        $this->module_mandatory_8 = $moduleMandatory8;
628
629
        return $this;
630
    }
631
632
    public function getModuleLevel8Min(): int
633
    {
634
        return $this->module_level_8_min;
635
    }
636
637
    public function setModuleLevel8Min(int $moduleLevel8Min): ShipRumpModuleLevelInterface
638
    {
639
        $this->module_level_8_min = $moduleLevel8Min;
640
641
        return $this;
642
    }
643
644
    public function getModuleLevel8Max(): int
645
    {
646
        return $this->module_level_8_max;
647
    }
648
649
    public function setModuleLevel8Max(int $moduleLevel8Max): ShipRumpModuleLevelInterface
650
    {
651
        $this->module_level_8_max = $moduleLevel8Max;
652
653
        return $this;
654
    }
655
656
    public function getModuleLevel11(): int
657
    {
658
        return $this->module_level_11;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->module_level_11 could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
659
    }
660
661
    public function setModuleLevel11(int $moduleLevel11): ShipRumpModuleLevelInterface
662
    {
663
        $this->module_level_11 = $moduleLevel11;
664
665
        return $this;
666
    }
667
668
    public function getModuleMandatory11(): int
669
    {
670
        return $this->module_mandatory_11;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->module_mandatory_11 could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
671
    }
672
673
    public function setModuleMandatory11(int $moduleMandatory11): ShipRumpModuleLevelInterface
674
    {
675
        $this->module_mandatory_11 = $moduleMandatory11;
676
677
        return $this;
678
    }
679
680
    public function getModuleLevel11Min(): int
681
    {
682
        return $this->module_level_11_min;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->module_level_11_min could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
683
    }
684
685
    public function setModuleLevel11Min(int $moduleLevel11Min): ShipRumpModuleLevelInterface
686
    {
687
        $this->module_level_11_min = $moduleLevel11Min;
688
689
        return $this;
690
    }
691
692
    public function getModuleLevel11Max(): int
693
    {
694
        return $this->module_level_11_max;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->module_level_11_max could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
695
    }
696
697
    public function setModuleLevel11Max(int $moduleLevel11Max): ShipRumpModuleLevelInterface
698
    {
699
        $this->module_level_11_max = $moduleLevel11Max;
700
701
        return $this;
702
    }
703
704
705
    public function getMandatoryModulesCount(): int
706
    {
707
        return $this->getModuleMandatory1() +
708
            $this->getModuleMandatory2() +
709
            $this->getModuleMandatory3() +
710
            $this->getModuleMandatory4() +
711
            $this->getModuleMandatory5() +
712
            $this->getModuleMandatory6() +
713
            $this->getModuleMandatory7() +
714
            $this->getModuleMandatory8() +
715
            $this->getModuleMandatory11();
716
    }
717
}
718