Passed
Push — dev6 ( fe5c4e...e6ba74 )
by Ron
16:02
created

TechTipPolicy::forceDelete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace App\Policies;
4
5
use App\Models\TechTip;
6
use App\Models\User;
7
use App\Traits\AllowTrait;
8
use Illuminate\Auth\Access\HandlesAuthorization;
9
10
class TechTipPolicy
11
{
12
    use HandlesAuthorization;
13
    use AllowTrait;
1 ignored issue
show
introduced by
The trait App\Traits\AllowTrait requires some properties which are not provided by App\Policies\TechTipPolicy: $role_id, $allow
Loading history...
14
15
    /**
16
     * Determine whether the user can view any models.
17
     *
18
     * @param  \App\Models\User  $user
19
     * @return mixed
20
     */
21
    public function viewAny(User $user)
0 ignored issues
show
Unused Code introduced by
The parameter $user is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

21
    public function viewAny(/** @scrutinizer ignore-unused */ User $user)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
    {
23
        //
24
    }
25
26
    /**
27
     * Determine whether the user can view the model.
28
     *
29
     * @param  \App\Models\User  $user
30
     * @param  \App\Models\TechTip  $techTip
31
     * @return mixed
32
     */
33
    public function view(User $user, TechTip $techTip)
0 ignored issues
show
Unused Code introduced by
The parameter $techTip is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

33
    public function view(User $user, /** @scrutinizer ignore-unused */ TechTip $techTip)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $user is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

33
    public function view(/** @scrutinizer ignore-unused */ User $user, TechTip $techTip)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
34
    {
35
        //
36
    }
37
38
    /**
39
     * Determine whether the user can create models.
40
     *
41
     * @param  \App\Models\User  $user
42
     * @return mixed
43
     */
44
    public function create(User $user)
45
    {
46
        //
47
        return $this->checkPermission($user, 'Add Tech Tip');
48
    }
49
50
    /**
51
     * Determine whether the user can update the model.
52
     *
53
     * @param  \App\Models\User  $user
54
     * @param  \App\Models\TechTip  $techTip
55
     * @return mixed
56
     */
57
    public function update(User $user, TechTip $techTip)
0 ignored issues
show
Unused Code introduced by
The parameter $techTip is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

57
    public function update(User $user, /** @scrutinizer ignore-unused */ TechTip $techTip)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
58
    {
59
        //
60
        return $this->checkPermission($user, 'Edit Tech Tip');
61
    }
62
63
    /**
64
     * Determine whether the user can delete the model.
65
     *
66
     * @param  \App\Models\User  $user
67
     * @param  \App\Models\TechTip  $techTip
68
     * @return mixed
69
     */
70
    public function delete(User $user, TechTip $techTip)
0 ignored issues
show
Unused Code introduced by
The parameter $techTip is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

70
    public function delete(User $user, /** @scrutinizer ignore-unused */ TechTip $techTip)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
71
    {
72
        //
73
        return $this->checkPermission($user, 'Delete Tech Tip');
74
    }
75
76
    /**
77
     * Determine whether the user can restore the model.
78
     *
79
     * @param  \App\Models\User  $user
80
     * @param  \App\Models\TechTip  $techTip
81
     * @return mixed
82
     */
83
    public function restore(User $user, TechTip $techTip)
0 ignored issues
show
Unused Code introduced by
The parameter $techTip is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

83
    public function restore(User $user, /** @scrutinizer ignore-unused */ TechTip $techTip)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $user is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

83
    public function restore(/** @scrutinizer ignore-unused */ User $user, TechTip $techTip)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
84
    {
85
        //
86
    }
87
88
    /**
89
     * Determine whether the user can permanently delete the model.
90
     *
91
     * @param  \App\Models\User  $user
92
     * @param  \App\Models\TechTip  $techTip
93
     * @return mixed
94
     */
95
    public function forceDelete(User $user, TechTip $techTip)
0 ignored issues
show
Unused Code introduced by
The parameter $techTip is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

95
    public function forceDelete(User $user, /** @scrutinizer ignore-unused */ TechTip $techTip)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $user is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

95
    public function forceDelete(/** @scrutinizer ignore-unused */ User $user, TechTip $techTip)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
96
    {
97
        //
98
    }
99
}
100