Permission::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * Linna Framework.
5
 *
6
 * @author Sebastian Rapetti <[email protected]>
7
 * @copyright (c) 2018, Sebastian Rapetti
8
 * @license http://opensource.org/licenses/MIT MIT License
9
 */
10
declare(strict_types=1);
11
12
namespace Linna\Authorization;
13
14
use Linna\DataMapper\DomainObjectAbstract;
15
16
/**
17
 * Permission.
18
 */
19
class Permission extends DomainObjectAbstract
20
{
21
    /**
22
     * @var string Permission name
23
     */
24
    public string $name = '';
25
26
    /**
27
     * @var string Permission description
28
     */
29
    public string $description = '';
30
31
    /**
32
     * @var int Id of the group from which the permission was inherited
33
     */
34
    public int $inherited = 0;
35
36
    /**
37
     * Class Constructor.
38
     */
39 222
    public function __construct()
40
    {
41 222
        \settype($this->id, 'integer');
42 222
        \settype($this->inherited, 'integer');
43 222
    }
44
}
45