Destroy   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 9
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
3
namespace App\Http\Controllers\Publications;
4
5
use App\Publication;
6
use Illuminate\Routing\Controller;
7
8
class Destroy extends Controller
9
{
10
    public function __invoke(Publication $publication)
11
    {
12
        $publication->delete();
13
14
        return [
15
            'message' => __('The publication was successfully deleted'),
16
            'redirect' => 'publications.index',
17
        ];
18
    }
19
}
20