RecruitmentUserPolicy::create()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace App\Policies;
4
5
use App\Models\User;
6
use Illuminate\Auth\Access\HandlesAuthorization;
7
8
class RecruitmentUserPolicy
9
{
10
    use HandlesAuthorization;
11
12
    public function list(User $user)
13
    {
14
        if ($user->can('update any recruitment')) {
15
            return true;
16
        }
17
18
        return false;
19
    }
20
21
    public function create(User $user)
22
    {
23
        if ($user->can('update any recruitment')) {
24
            return true;
25
        }
26
27
        return false;
28
    }
29
30
    public function delete(User $user)
31
    {
32
        if ($user->can('update any recruitment')) {
33
            return true;
34
        }
35
36
        return false;
37
    }
38
}
39