Passed
Pull Request — master (#1984)
by Nico
20:34 queued 10:19
created

LotteryWinnerBuildplan   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 24
dl 0
loc 44
ccs 0
cts 8
cp 0
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getFactionId() 0 4 1
A getChance() 0 4 1
A getId() 0 4 1
A getBuildplan() 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\JoinColumn;
12
use Doctrine\ORM\Mapping\ManyToOne;
13
use Doctrine\ORM\Mapping\Table;
14
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...
15
use Stu\Orm\Repository\LotteryWinnerBuildplanRepository;
16
17
#[Table(name: 'stu_lottery_buildplan')]
18
#[Entity(repositoryClass: LotteryWinnerBuildplanRepository::class)]
19
class LotteryWinnerBuildplan implements LotteryWinnerBuildplanInterface
20
{
21
    #[Id]
22
    #[Column(type: 'integer')]
23
    #[GeneratedValue(strategy: 'IDENTITY')]
24
    private int $id;
25
26
    #[Column(type: 'integer')]
27
    private int $buildplan_id;
0 ignored issues
show
introduced by
The private property $buildplan_id is not used, and could be removed.
Loading history...
28
29
    #[Column(type: 'integer')]
30
    private int $chance;
31
32
    #[Column(type: 'integer', nullable: true)]
33
    private ?int $faction_id = null;
34
35
    #[ManyToOne(targetEntity: 'SpacecraftBuildplan')]
36
    #[JoinColumn(name: 'buildplan_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
37
    private SpacecraftBuildplanInterface $buildplan;
38
39
    #[Override]
40
    public function getId(): int
41
    {
42
        return $this->id;
43
    }
44
45
    #[Override]
46
    public function getBuildplan(): SpacecraftBuildplanInterface
47
    {
48
        return $this->buildplan;
49
    }
50
51
    #[Override]
52
    public function getChance(): int
53
    {
54
        return $this->chance;
55
    }
56
57
    #[Override]
58
    public function getFactionId(): ?int
59
    {
60
        return $this->faction_id;
61
    }
62
}
63