SyncingRolesWithPermission::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

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