Passed
Push — master ( 3ab1c5...c69ced )
by Derek Stephen
17:56 queued 16:05
created

PassportRole::setEntityId()   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\HasCreatedAtDate;
8
use Bone\BoneDoctrine\Traits\HasId;
9
use Doctrine\ORM\Mapping as ORM;
10
11
#[ORM\Entity]
12
#[ORM\HasLifecycleCallbacks]
13
class PassportRole
14
{
15
    use HasId;
16
17
    #[ORM\Column(type: 'integer')]
18
    private int $userId;
19
20
    #[ORM\ManyToOne(targetEntity: Role::class)]
21
    private Role $role;
22
23
    #[ORM\Column(type: 'integer', nullable: true)]
24
    private $entityId;
25
26
    #[ORM\Column(type: 'integer', nullable: true)]
27
    private ?int $approvedById = null;
28
29
    use HasCreatedAtDate;
30
31 1
    public function getUserId(): int
32
    {
33 1
        return $this->userId;
34
    }
35
36 2
    public function setUserId(int $userId): void
37
    {
38 2
        $this->userId = $userId;
39
    }
40
41 2
    public function getRole(): Role
42
    {
43 2
        return $this->role;
44
    }
45
46 2
    public function setRole(Role $role): void
47
    {
48 2
        $this->role = $role;
49
    }
50
51 2
    public function getEntityId(): ?int
52
    {
53 2
        return $this->entityId;
54
    }
55
56 2
    public function setEntityId(int $entityId): void
57
    {
58 2
        $this->entityId = $entityId;
59
    }
60
61 1
    public function getApprovedById(): ?int
62
    {
63 1
        return $this->approvedById;
64
    }
65
66 1
    public function setApprovedById(?int $approvedById): void
67
    {
68 1
        $this->approvedById = $approvedById;
69
    }
70
}
71