Passed
Push — dev ( 2ba144...6e3434 )
by Janko
17:42
created

SpacecraftRumpBaseValues   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 115
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 55
dl 0
loc 115
rs 10
c 1
b 0
f 0
ccs 24
cts 24
cp 1
wmc 12

12 Methods

Rating   Name   Duplication   Size   Complexity  
A getBaseWarpDrive() 0 4 1
A getBaseSensorRange() 0 4 1
A getBaseCrew() 0 4 1
A getBaseShield() 0 4 1
A getHitChance() 0 4 1
A getBaseDamage() 0 4 1
A getSpecialSlots() 0 4 1
A getBaseReactor() 0 4 1
A getEvadeChance() 0 4 1
A getModuleLevel() 0 4 1
A getBaseEps() 0 4 1
A getBaseHull() 0 4 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\Id;
10
use Doctrine\ORM\Mapping\JoinColumn;
11
use Doctrine\ORM\Mapping\OneToOne;
12
use Doctrine\ORM\Mapping\Table;
13
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...
14
15
#[Table(name: 'stu_rump_base_values')]
16
#[Entity]
17
class SpacecraftRumpBaseValues implements SpacecraftRumpBaseValuesInterface
18
{
19
    #[Id]
20
    #[OneToOne(targetEntity: 'SpacecraftRump', inversedBy: 'baseValues')]
21
    #[JoinColumn(name: 'rump_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
22
    private SpacecraftRumpInterface $rump;
0 ignored issues
show
introduced by
The private property $rump is not used, and could be removed.
Loading history...
23
24
    #[column(type: 'smallint')]
25
    private int $evade_chance = 0;
26
27
    #[column(type: 'smallint')]
28
    private int $hit_chance = 0;
29
30
    #[column(type: 'smallint')]
31
    private int $module_level = 0;
32
33
    #[column(type: 'smallint')]
34
    private int $base_crew = 0;
35
36
    #[column(type: 'smallint')]
37
    private int $base_eps = 0;
38
39
    #[column(type: 'smallint')]
40
    private int $base_reactor = 0;
41
42
    #[column(type: 'integer')]
43
    private int $base_hull = 0;
44
45
    #[column(type: 'integer')]
46
    private int $base_shield = 0;
47
48
    #[column(type: 'smallint')]
49
    private int $base_damage = 0;
50
51
    #[column(type: 'smallint')]
52
    private int $base_sensor_range = 0;
53
54
    #[Column(type: 'integer')]
55
    private int $base_warpdrive = 0;
56
57
    #[column(type: 'smallint')]
58
    private int $special_slots = 0;
59
60 3
    #[Override]
61
    public function getEvadeChance(): int
62
    {
63 3
        return $this->evade_chance;
64
    }
65
66 4
    #[Override]
67
    public function getHitChance(): int
68
    {
69 4
        return $this->hit_chance;
70
    }
71
72 4
    #[Override]
73
    public function getModuleLevel(): int
74
    {
75 4
        return $this->module_level;
76
    }
77
78 11
    #[Override]
79
    public function getBaseCrew(): int
80
    {
81 11
        return $this->base_crew;
82
    }
83
84 4
    #[Override]
85
    public function getBaseEps(): int
86
    {
87 4
        return $this->base_eps;
88
    }
89
90 4
    #[Override]
91
    public function getBaseReactor(): int
92
    {
93 4
        return $this->base_reactor;
94
    }
95
96 4
    #[Override]
97
    public function getBaseHull(): int
98
    {
99 4
        return $this->base_hull;
100
    }
101
102 4
    #[Override]
103
    public function getBaseShield(): int
104
    {
105 4
        return $this->base_shield;
106
    }
107
108 4
    #[Override]
109
    public function getBaseDamage(): int
110
    {
111 4
        return $this->base_damage;
112
    }
113
114 5
    #[Override]
115
    public function getBaseSensorRange(): int
116
    {
117 5
        return $this->base_sensor_range;
118
    }
119
120 3
    #[Override]
121
    public function getBaseWarpDrive(): int
122
    {
123 3
        return $this->base_warpdrive;
124
    }
125
126 3
    #[Override]
127
    public function getSpecialSlots(): int
128
    {
129 3
        return $this->special_slots;
130
    }
131
}
132