Passport   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getUserId() 0 3 1
A __construct() 0 4 1
A getEntitlements() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Del\Passport;
6
7
use Del\Passport\Entity\PassportRole;
8
use Doctrine\Common\Collections\Collection;
9
10
class Passport implements PassportInterface
11
{
12 1
    public function __construct(
13
        private int $id,
14
        private Collection $entitlements
15 1
    ) {}
16
17
    /** @var Collection<PassportRole> */
18 1
    public function getEntitlements(): Collection
19
    {
20 1
        return $this->entitlements;
21
    }
22
23 1
    public function getUserId(): int
24
    {
25 1
        return $this->id;
26
    }
27
}
28