Passed
Push — master ( 51edae...d29a9b )
by Curtis
11:52 queued 05:54
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 4
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 5 1
1
<?php
2
3
namespace App\Http\Controllers\enso\files\Upload;
4
5
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
6
use Illuminate\Routing\Controller;
7
use LaravelEnso\Files\Models\Upload;
8
9
class Destroy extends Controller
10
{
11
    use AuthorizesRequests;
12
13
    public function __invoke(Upload $upload)
14
    {
15
        $this->authorize('handle', $upload->file);
0 ignored issues
show
Bug introduced by
The property file does not seem to exist on LaravelEnso\Files\Models\Upload. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
16
17
        $upload->delete();
18
    }
19
}
20