PassportRole::getEntityId()   A
last analyzed

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 1
    public function getUserId(): int
31
    {
32 1
        return $this->userId;
33
    }
34
35 2
    public function setUserId(int $userId): void
36
    {
37 2
        $this->userId = $userId;
38
    }
39
40 2
    public function getEntityId(): ?int
41
    {
42 2
        return $this->entityId;
43
    }
44
45 2
    public function setEntityId(int $entityId): void
46
    {
47 2
        $this->entityId = $entityId;
48
    }
49
50 1
    public function getApprovedById(): ?int
51
    {
52 1
        return $this->approvedById;
53
    }
54
55 1
    public function setApprovedById(?int $approvedById): void
56
    {
57 1
        $this->approvedById = $approvedById;
58
    }
59
}
60