Completed
Push — master ( 20c83d...440e81 )
by Derek Stephen
01:23
created

Passport   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 27
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

3 Methods

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