Passed
Push — dev6 ( 547e26...d08fa1 )
by Ron
21:59
created

EquipmentCategoryPolicy::forceDelete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 0
c 2
b 0
f 0
dl 0
loc 2
rs 10
ccs 0
cts 0
cp 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
namespace App\Policies;
4
5
use App\Models\User;
6
use App\Traits\AllowTrait;
7
use Illuminate\Auth\Access\HandlesAuthorization;
8
9
class EquipmentCategoryPolicy
10
{
11
    use AllowTrait;
12
    use HandlesAuthorization;
13
14
        /**
15
     * Determine whether the user can create models
16
     */
17
    public function create(User $user)
18 13
    {
19
        return $this->checkPermission($user, 'Manage Equipment');
20 13
    }
21
22 13
    /**
23 13
     * Determine whether the user can update the model
24
     */
25 13
    public function update(User $user)
26
    {
27 13
        return $this->checkPermission($user, 'Manage Equipment');
28
    }
29 7
30
    /**
31 6
     * Determine whether the user can delete the model
32
     */
33
    public function delete(User $user)
34
    {
35
        return $this->checkPermission($user, 'Manage Equipment');
36
    }
37
}
38