Passed
Push — master ( df16e4...50087e )
by Nico
27:13 queued 16:48
created

WormholeRestriction::getUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 4
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\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\WormholeRestrictionRepository;
16
17
#[Table(name: 'stu_wormhole_restrictions')]
18
#[Entity(repositoryClass: WormholeRestrictionRepository::class)]
19
class WormholeRestriction implements WormholeRestrictionInterface
20
{
21
    #[Id]
22
    #[Column(type: 'integer')]
23
    #[GeneratedValue(strategy: 'IDENTITY')]
24
    private int $id;
25
26
    #[ManyToOne(targetEntity: 'WormholeEntry')]
27
    #[JoinColumn(name: 'wormhole_entry_id', referencedColumnName: 'id')]
28
    private WormholeEntryInterface $wormholeEntry;
29
30
    #[ManyToOne(targetEntity: 'User')]
31
    #[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
32
    private UserInterface $user;
33
34
    #[Column(type: 'integer', nullable: true)]
35
    private ?int $mode = null;
36
37
    #[Override]
38
    public function getId(): int
39
    {
40
        return $this->id;
41
    }
42
43
    #[Override]
44
    public function getWormholeEntry(): WormholeEntryInterface
45
    {
46
        return $this->wormholeEntry;
47
    }
48
49
    #[Override]
50
    public function setWormholeEntry(WormholeEntryInterface $wormholeEntry): WormholeRestrictionInterface
51
    {
52
        $this->wormholeEntry = $wormholeEntry;
53
        return $this;
54
    }
55
56
    #[Override]
57
    public function getUser(): UserInterface
58
    {
59
        return $this->user;
60
    }
61
62
    #[Override]
63
    public function setUser(UserInterface $user): WormholeRestrictionInterface
64
    {
65
        $this->user = $user;
66
        return $this;
67
    }
68
69
    #[Override]
70
    public function getMode(): ?int
71
    {
72
        return $this->mode;
73
    }
74
75
    #[Override]
76
    public function setMode(?int $mode): WormholeRestrictionInterface
77
    {
78
        $this->mode = $mode;
79
        return $this;
80
    }
81
}
82