Passed
Push — master ( 1d5530...fba2a1 )
by Nico
56:37 queued 25:57
created

FlightSignature   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 161
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 78
c 0
b 0
f 0
dl 0
loc 161
ccs 0
cts 45
cp 0
rs 10
wmc 18

18 Methods

Rating   Name   Duplication   Size   Complexity  
A setShipName() 0 5 1
A setToDirection() 0 5 1
A getTime() 0 4 1
A setUserId() 0 5 1
A getShipId() 0 4 1
A getFromDirection() 0 4 1
A setLocation() 0 6 1
A setShipId() 0 5 1
A getRump() 0 4 1
A setTime() 0 5 1
A getToDirection() 0 4 1
A isCloaked() 0 4 1
A setFromDirection() 0 5 1
A getShipName() 0 4 1
A setIsCloaked() 0 5 1
A setRump() 0 5 1
A getId() 0 4 1
A getLocation() 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\GeneratedValue;
10
use Doctrine\ORM\Mapping\Id;
11
use Doctrine\ORM\Mapping\Index;
12
use Doctrine\ORM\Mapping\JoinColumn;
13
use Doctrine\ORM\Mapping\ManyToOne;
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\FlightSignatureRepository;
17
18
#[Table(name: 'stu_flight_sig')]
19
#[Index(name: 'flight_sig_user_idx', columns: ['user_id'])]
20
#[Index(name: 'flight_sig_sensor_result_idx', columns: ['from_direction', 'to_direction', 'time'])]
21
#[Entity(repositoryClass: FlightSignatureRepository::class)]
22
class FlightSignature implements FlightSignatureInterface
23
{
24
    #[Id]
25
    #[Column(type: 'integer')]
26
    #[GeneratedValue(strategy: 'IDENTITY')]
27
    private int $id;
28
29
    #[Column(type: 'integer')]
30
    private int $user_id = 0;
31
32
    #[Column(type: 'integer')]
33
    private int $ship_id = 0;
34
35
    #[Column(type: 'integer')]
36
    private int $rump_id = 0;
0 ignored issues
show
introduced by
The private property $rump_id is not used, and could be removed.
Loading history...
37
38
    #[Column(type: 'integer')]
39
    private int $time = 0;
40
41
    #[Column(type: 'integer')]
42
    private int $location_id = 0;
0 ignored issues
show
introduced by
The private property $location_id is not used, and could be removed.
Loading history...
43
44
    #[Column(type: 'smallint', length: 1)]
45
    private int $from_direction = 0;
46
47
    #[Column(type: 'smallint', length: 1)]
48
    private int $to_direction = 0;
49
50
    #[Column(type: 'string')]
51
    private string $ship_name;
52
53
    #[Column(type: 'boolean')]
54
    private bool $is_cloaked = false;
55
56
    #[ManyToOne(targetEntity: 'ShipRump')]
57
    #[JoinColumn(name: 'rump_id', referencedColumnName: 'id')]
58
    private ShipRumpInterface $rump;
59
60
    #[ManyToOne(targetEntity: 'Location')]
61
    #[JoinColumn(name: 'location_id', referencedColumnName: 'id')]
62
    private LocationInterface $location;
63
64
    #[Override]
65
    public function getId(): int
66
    {
67
        return $this->id;
68
    }
69
70
    #[Override]
71
    public function setUserId(int $userId): FlightSignatureInterface
72
    {
73
        $this->user_id = $userId;
74
        return $this;
75
    }
76
77
    #[Override]
78
    public function getShipId(): int
79
    {
80
        return $this->ship_id;
81
    }
82
83
    #[Override]
84
    public function setShipId(int $shipId): FlightSignatureInterface
85
    {
86
        $this->ship_id = $shipId;
87
        return $this;
88
    }
89
90
    #[Override]
91
    public function getShipName(): string
92
    {
93
        return $this->ship_name;
94
    }
95
96
    #[Override]
97
    public function setShipName(string $name): FlightSignatureInterface
98
    {
99
        $this->ship_name = $name;
100
        return $this;
101
    }
102
103
    #[Override]
104
    public function isCloaked(): bool
105
    {
106
        return $this->is_cloaked;
107
    }
108
109
    #[Override]
110
    public function setIsCloaked(bool $isCloaked): FlightSignatureInterface
111
    {
112
        $this->is_cloaked = $isCloaked;
113
        return $this;
114
    }
115
116
    #[Override]
117
    public function getRump(): ShipRumpInterface
118
    {
119
        return $this->rump;
120
    }
121
122
    #[Override]
123
    public function setRump(ShipRumpInterface $shipRump): FlightSignatureInterface
124
    {
125
        $this->rump = $shipRump;
126
        return $this;
127
    }
128
129
    #[Override]
130
    public function getTime(): int
131
    {
132
        return $this->time;
133
    }
134
    #[Override]
135
    public function setTime(int $time): FlightSignatureInterface
136
    {
137
        $this->time = $time;
138
        return $this;
139
    }
140
141
    #[Override]
142
    public function getLocation(): LocationInterface
143
    {
144
        return $this->location;
145
    }
146
147
    #[Override]
148
    public function setLocation(LocationInterface $location): FlightSignatureInterface
149
    {
150
        $this->location = $location;
151
152
        return $this;
153
    }
154
155
    #[Override]
156
    public function getFromDirection(): int
157
    {
158
        return $this->from_direction;
159
    }
160
161
    #[Override]
162
    public function setFromDirection(int $direction): FlightSignatureInterface
163
    {
164
        $this->from_direction = $direction;
165
        return $this;
166
    }
167
168
    #[Override]
169
    public function getToDirection(): int
170
    {
171
        return $this->to_direction;
172
    }
173
174
    #[Override]
175
    public function setToDirection(int $direction): FlightSignatureInterface
176
    {
177
        $this->to_direction = $direction;
178
        return $this;
179
    }
180
}
181