Total Complexity | 6 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 0 |
1 | <?php namespace Pz\LaravelDoctrine\Rest; |
||
3 | abstract class RestPolicy |
||
4 | { |
||
5 | /** |
||
6 | * @return bool |
||
7 | */ |
||
8 | 3 | public function defaultAccess(/** @scrutinizer ignore-unused */ $user) |
|
9 | { |
||
10 | 3 | return false; |
|
11 | } |
||
12 | |||
13 | /** |
||
14 | * @param object $user |
||
15 | * |
||
16 | * @return bool |
||
17 | */ |
||
18 | public function index($user) |
||
19 | { |
||
20 | return $this->defaultAccess($user); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @param object $user |
||
25 | * |
||
26 | * @return bool |
||
27 | */ |
||
28 | 1 | public function show($user, /** @scrutinizer ignore-unused */ $entity) |
|
29 | { |
||
30 | 1 | return $this->defaultAccess($user); |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param object $user |
||
35 | * |
||
36 | * @return bool |
||
37 | */ |
||
38 | 1 | public function create($user) |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * @param object $user |
||
45 | * @param object $entity |
||
46 | * |
||
47 | * @return bool |
||
48 | */ |
||
49 | public function update($user, /** @scrutinizer ignore-unused */ $entity) |
||
50 | { |
||
51 | return $this->defaultAccess($user); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @param object $user |
||
56 | * @param object $entity |
||
57 | * |
||
58 | * @return bool |
||
59 | */ |
||
60 | 1 | public function delete($user, $entity) |
|
63 | } |
||
64 | } |
||
65 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.