Passed
Push — master ( db3f57...d4babd )
by Derek Stephen
06:48
created

PassportRole::setApprovedById()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
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
class PassportRole
13
{
14
    use HasId;
15
16
    #[ORM\Column(type: 'integer')]
17
    private int $userId;
18
19
    #[ORM\ManyToOne(targetEntity: Role::class)]
20
    private Role $role;
21
22
    #[ORM\Column(type: 'integer', nullable: true)]
23
    private $entityId;
24 1
25
    #[ORM\Column(type: 'integer')]
26 1
    private ?int $approvedById = null;
27
28
    use HasCreatedAtDate;
29 2
30
    public function getUserId(): int
31 2
    {
32
        return $this->userId;
33
    }
34 2
35
    public function setUserId(int $userId): void
36 2
    {
37
        $this->userId = $userId;
38
    }
39 2
40
    public function getRole(): Role
41 2
    {
42
        return $this->role;
43
    }
44 2
45
    public function setRole(Role $role): void
46 2
    {
47
        $this->role = $role;
48
    }
49 2
50
    public function getEntityId(): ?int
51 2
    {
52
        return $this->entityId;
53
    }
54
55
    public function setEntityId(int $entityId): void
56
    {
57
        $this->entityId = $entityId;
58
    }
59
60
    public function getApprovedById(): ?int
61
    {
62
        return $this->approvedById;
63
    }
64
65
    public function setApprovedById(?int $approvedById): void
66
    {
67
        $this->approvedById = $approvedById;
68
    }
69
}
70