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\Sourcerefeven;
4
5
use App\Http\Requests\ValidateSourceRefEvenRequest;
6
use App\Models\SourceRefEven;
7
use Illuminate\Routing\Controller;
8
9
class Store extends Controller
10
{
11
    public function __invoke(ValidateSourceRefEvenRequest $request, SourceRefEven $sourceRefEven)
12
    {
13
        $sourceRefEven->fill($request->validated())->save();
14
15
        return [
16
            'message' => __('The source ref even was successfully created'),
17
            'redirect' => 'sourcerefeven.edit',
18
            'param' => ['sourceRefEven' => $sourceRefEven->id],
19
        ];
20
    }
21
}
22