RecruitmentUserPolicy   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 29
rs 10
wmc 6

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 7 2
A delete() 0 7 2
A list() 0 7 2
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