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

PassportRole   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 15
c 2
b 0
f 0
dl 0
loc 42
ccs 12
cts 12
cp 1
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUserId() 0 3 1
A getRole() 0 3 1
A setEntityId() 0 3 1
A setRole() 0 3 1
A getUserId() 0 3 1
A getEntityId() 0 3 1
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