Completed
Push — master ( 1680b9...7d3d6e )
by Mohamed
15s queued 11s
created

UserController::created()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Microboard\Http\Controllers;
4
5
use App\User;
6
use Microboard\DataTables\UserDataTable;
7
use Microboard\Http\Requests\User\StoreFormRequest;
8
use Microboard\Http\Requests\User\UpdateFormRequest;
9
10
class UserController extends ResourceController
11
{
12
    protected array $indexWidgets = [
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_ARRAY, expecting T_FUNCTION or T_CONST
Loading history...
13
        '\Microboard\Widgets\UsersInThisMonth' => [
14
            'size' => 'col-md-6'
15
        ],
16
        '\Microboard\Widgets\PopularRole' => [
17
            'size' => 'col-md-6'
18
        ]
19
    ];
20
21
    /**
22
     * @param UpdateFormRequest $request
23
     * @param User $model
24
     * @return mixed|void
25
     */
26
    protected function created($request, $model)
27
    {
28
        addMediaTo($model, 'avatar');
29
    }
30
31
    /**
32
     * @param UpdateFormRequest $request
33
     * @param User $model
34
     * @return mixed|void
35
     */
36
    protected function updated($request, $model)
37
    {
38
        addMediaTo($model, 'avatar');
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    protected function getStoreFormRequest(): string
45
    {
46
        return StoreFormRequest::class;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    protected function getUpdateFormRequest(): string
53
    {
54
        return UpdateFormRequest::class;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    protected function getDatatable(): string
61
    {
62
        return UserDataTable::class;
63
    }
64
}
65