Completed
Pull Request — master (#23)
by ARCANEDEV
10:18
created

SyncingRolesWithPermission   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 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
    /** @var  \Illuminate\Database\Eloquent\Collection */
19
    public $roles;
20
21
    /* -----------------------------------------------------------------
22
     |  Constructor
23
     | -----------------------------------------------------------------
24
     */
25
    /**
26
     * SyncingRolesWithPermission constructor.
27
     *
28
     * @param  \Arcanesoft\Contracts\Auth\Models\Permission  $permission
29
     * @param  \Illuminate\Database\Eloquent\Collection      $roles
30
     */
31 3
    public function __construct(Permission $permission, Collection $roles)
32
    {
33 3
        parent::__construct($permission);
34
35 3
        $this->roles = $roles;
36 3
    }
37
}
38