Passed
Push — master ( b7c92b...6155c6 )
by Derek Stephen
12:55
created

PassportRole::setUserId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Del\Passport\Entity;
6
7
use Bone\BoneDoctrine\Traits\HasId;
8
use Doctrine\ORM\Mapping as ORM;
9
10
#[ORM\Entity]
11
class PassportRole
12
{
13
    use HasId;
14
15
    #[ORM\Column(type: 'integer')]
16
    private int $userId;
17
18
    #[ORM\ManyToOne(targetEntity: Role::class)]
19
    private Role $role;
20
21
    #[ORM\Column(type: 'integer')]
22
    private $entityId;
23
24 1
    public function getUserId(): int
25
    {
26 1
        return $this->userId;
27
    }
28
29 2
    public function setUserId(int $userId): void
30
    {
31 2
        $this->userId = $userId;
32
    }
33
34 2
    public function getRole(): Role
35
    {
36 2
        return $this->role;
37
    }
38
39 2
    public function setRole(Role $role): void
40
    {
41 2
        $this->role = $role;
42
    }
43
44 2
    public function getEntityId(): ?int
45
    {
46 2
        return $this->entityId;
47
    }
48
49 2
    public function setEntityId(int $entityId): void
50
    {
51 2
        $this->entityId = $entityId;
52
    }
53
}
54