DetachedRoleFromPermission::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1
cc 1
nc 1
nop 3
crap 1
1
<?php namespace Arcanedev\LaravelAuth\Events\Permissions;
2
3
use Arcanesoft\Contracts\Auth\Models\Permission;
4
5
/**
6
 * Class     DetachedRoleFromPermission
7
 *
8
 * @package  Arcanedev\LaravelAuth\Events\Permissions
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class DetachedRoleFromPermission extends AbstractPermissionEvent
12
{
13
    /* -----------------------------------------------------------------
14
     |  Properties
15
     | -----------------------------------------------------------------
16
     */
17
18
    /** @var  \Arcanesoft\Contracts\Auth\Models\Role|int */
19
    public $role;
20
21
    /** @var  int */
22
    public $results;
23
24
    /* -----------------------------------------------------------------
25
     |  Constructor
26
     | -----------------------------------------------------------------
27
     */
28
29
    /**
30
     * DetachedRoleFromPermission constructor.
31
     *
32
     * @param  \Arcanesoft\Contracts\Auth\Models\Permission  $permission
33
     * @param  \Arcanesoft\Contracts\Auth\Models\Role|int    $role
34
     * @param  int                                           $results
35
     */
36 3
    public function __construct(Permission $permission, $role, $results)
37
    {
38 3
        parent::__construct($permission);
39
40 3
        $this->role    = $role;
41 3
        $this->results = $results;
42 3
    }
43
}
44