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

Destroy   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

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