Passed
Push — master ( 97f5da...ec9858 )
by Derek Stephen
13:20
created

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