PassportRole   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 18
c 3
b 0
f 0
dl 0
loc 46
ccs 12
cts 12
cp 1
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUserId() 0 3 1
A setApprovedById() 0 3 1
A getApprovedById() 0 3 1
A setEntityId() 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\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