Passed
Push — master ( acf2dc...3a8b1f )
by Curtis
12:39
created

Destroy::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace App\Http\Controllers\Citation;
4
5
use App\Citation;
6
use Illuminate\Routing\Controller;
7
8
class Destroy extends Controller
9
{
10
    public function __invoke(Citation $citation)
11
    {
12
        $citation->delete();
13
14
        return [
15
            'message' => __('The citation was successfully deleted'),
16
            'redirect' => 'citation.index',
17
        ];
18
    }
19
}
20