Updated::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Mrluke\Privileges\Events\Role;
4
5
use Illuminate\Foundation\Events\Dispatchable;
6
use Illuminate\Queue\SerializesModels;
7
8
use Mrluke\Privileges\Models\Role;
9
10
class Updated
11
{
12
    use Dispatchable, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Mrluke\Privileges\Events\Role\Updated: $id, $relations, $class, $connection, $keyBy
Loading history...
13
14
    /**
15
     * Authenticable that cause Event.
16
     *
17
     * @var \Illuminate\Foundation\Auth\User
18
     */
19
    public $auth;
20
21
    /**
22
     * Instance of new model.
23
     *
24
     * @var \Mrluke\Privileges\Models\Role
25
     */
26
    public $model;
27
28
    public function __construct(Role $model)
29
    {
30
        $this->auth = auth()->user();
31
        $this->model = $model;
32
    }
33
}
34