pratiksh404 /
adminetic-website
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace Adminetic\Website\Policies; |
||||||
| 4 | |||||||
| 5 | use Adminetic\Website\Models\Admin\Faq; |
||||||
| 6 | use App\Models\User; |
||||||
|
0 ignored issues
–
show
|
|||||||
| 7 | use Illuminate\Auth\Access\HandlesAuthorization; |
||||||
| 8 | |||||||
| 9 | class FaqPolicy |
||||||
| 10 | { |
||||||
| 11 | use HandlesAuthorization; |
||||||
| 12 | |||||||
| 13 | public function before($user, $ability) |
||||||
|
0 ignored issues
–
show
The parameter
$ability 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
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...
|
|||||||
| 14 | { |
||||||
| 15 | if ($user->isSuperAdmin()) { |
||||||
| 16 | return true; |
||||||
| 17 | } |
||||||
| 18 | } |
||||||
| 19 | |||||||
| 20 | /** |
||||||
| 21 | * Determine whether the user can view any models. |
||||||
| 22 | * |
||||||
| 23 | * @param \App\Models\User $user |
||||||
| 24 | * @return mixed |
||||||
| 25 | */ |
||||||
| 26 | public function viewAny(User $user) |
||||||
| 27 | { |
||||||
| 28 | return $user->userCanDo('Faq', 'browse'); |
||||||
| 29 | } |
||||||
| 30 | |||||||
| 31 | /** |
||||||
| 32 | * Determine whether the user can view the model. |
||||||
| 33 | * |
||||||
| 34 | * @param \App\Models\User $user |
||||||
| 35 | * @param \Adminetic\Website\Models\Admin\Faq $faq |
||||||
| 36 | * @return mixed |
||||||
| 37 | */ |
||||||
| 38 | public function view(User $user, Faq $faq) |
||||||
|
0 ignored issues
–
show
The parameter
$faq 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
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...
|
|||||||
| 39 | { |
||||||
| 40 | return $user->userCanDo('Faq', 'read'); |
||||||
| 41 | } |
||||||
| 42 | |||||||
| 43 | /** |
||||||
| 44 | * Determine whether the user can create models. |
||||||
| 45 | * |
||||||
| 46 | * @param \App\Models\User $user |
||||||
| 47 | * @return mixed |
||||||
| 48 | */ |
||||||
| 49 | public function create(User $user) |
||||||
| 50 | { |
||||||
| 51 | return $user->userCanDo('Faq', 'add'); |
||||||
| 52 | } |
||||||
| 53 | |||||||
| 54 | /** |
||||||
| 55 | * Determine whether the user can update the model. |
||||||
| 56 | * |
||||||
| 57 | * @param \App\Models\User $user |
||||||
| 58 | * @param \Adminetic\Website\Models\Admin\Faq $faq |
||||||
| 59 | * @return mixed |
||||||
| 60 | */ |
||||||
| 61 | public function update(User $user, Faq $faq) |
||||||
|
0 ignored issues
–
show
The parameter
$faq 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
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...
|
|||||||
| 62 | { |
||||||
| 63 | return $user->userCanDo('Faq', 'edit'); |
||||||
| 64 | } |
||||||
| 65 | |||||||
| 66 | /** |
||||||
| 67 | * Determine whether the user can delete the model. |
||||||
| 68 | * |
||||||
| 69 | * @param \App\Models\User $user |
||||||
| 70 | * @param \Adminetic\Website\Models\Admin\Faq $faq |
||||||
| 71 | * @return mixed |
||||||
| 72 | */ |
||||||
| 73 | public function delete(User $user, Faq $faq) |
||||||
|
0 ignored issues
–
show
The parameter
$faq 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
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...
|
|||||||
| 74 | { |
||||||
| 75 | return $user->userCanDo('Faq', 'delete'); |
||||||
| 76 | } |
||||||
| 77 | |||||||
| 78 | /** |
||||||
| 79 | * Determine whether the user can restore the model. |
||||||
| 80 | * |
||||||
| 81 | * @param \App\Models\User $user |
||||||
| 82 | * @param \Adminetic\Website\Models\Admin\Faq $faq |
||||||
| 83 | * @return mixed |
||||||
| 84 | */ |
||||||
| 85 | public function restore(User $user, Faq $faq) |
||||||
|
0 ignored issues
–
show
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
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...
The parameter
$faq 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
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...
|
|||||||
| 86 | { |
||||||
| 87 | return true; |
||||||
| 88 | } |
||||||
| 89 | |||||||
| 90 | /** |
||||||
| 91 | * Determine whether the user can permanently delete the model. |
||||||
| 92 | * |
||||||
| 93 | * @param \App\Models\User $user |
||||||
| 94 | * @param \Adminetic\Website\Models\Admin\Faq $faq |
||||||
| 95 | * @return mixed |
||||||
| 96 | */ |
||||||
| 97 | public function forceDelete(User $user, Faq $faq) |
||||||
|
0 ignored issues
–
show
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
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...
The parameter
$faq 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
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...
|
|||||||
| 98 | { |
||||||
| 99 | return true; |
||||||
| 100 | } |
||||||
| 101 | } |
||||||
| 102 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths