SyncingUserWithRoles   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
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 28
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\Users;
2
3
use Arcanesoft\Contracts\Auth\Models\User;
4
use Illuminate\Database\Eloquent\Collection;
5
6
/**
7
 * Class     SyncingUserWithRoles
8
 *
9
 * @package  Arcanedev\LaravelAuth\Events\Users
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class SyncingUserWithRoles extends AbstractUserEvent
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
     * SyncingUserWithRoles constructor.
29
     *
30
     * @param  \Arcanesoft\Contracts\Auth\Models\User    $user
31
     * @param  \Illuminate\Database\Eloquent\Collection  $roles
32
     */
33 3
    public function __construct(User $user, Collection $roles)
34
    {
35 3
        parent::__construct($user);
36
37 3
        $this->roles = $roles;
38 3
    }
39
}
40