PermissionData   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 31
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getType() 0 4 1
A getClass() 0 4 1
A isNullable() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the zibios/sharep.
7
 *
8
 * (c) Zbigniew Ślązak
9
 */
10
11
namespace App\Voter\Configuration;
12
13
class PermissionData
14
{
15
    /** @var string */
16
    private $type;
17
    /** @var string */
18
    private $class;
19
    /** @var bool */
20
    private $isNullable;
21
22 16
    public function __construct(string $roleValue, string $class, bool $isNullable)
23
    {
24 16
        $this->type = $roleValue;
25 16
        $this->class = $class;
26 16
        $this->isNullable = $isNullable;
27 16
    }
28
29 16
    public function getType(): string
30
    {
31 16
        return $this->type;
32
    }
33
34 15
    public function getClass(): string
35
    {
36 15
        return $this->class;
37
    }
38
39 4
    public function isNullable(): bool
40
    {
41 4
        return $this->isNullable;
42
    }
43
}
44