Store   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 1
1
<?php
2
3
namespace App\Http\Controllers\Chan;
4
5
use App\Http\Requests\ValidateChanRequest;
6
use App\Models\Chan;
7
use Illuminate\Routing\Controller;
8
9
class Store extends Controller
10
{
11
    public function __invoke(ValidateChanRequest $request, Chan $chan)
12
    {
13
        $chan->fill($request->validated())->save();
14
15
        return [
16
            'message' => __('The chan was successfully created'),
17
            'redirect' => 'chan.edit',
18
            'param' => ['chan' => $chan->id],
19
        ];
20
    }
21
}
22