Total Complexity | 6 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class DemoController |
||
19 | { |
||
20 | public function entity(User $user) |
||
23 | } |
||
24 | |||
25 | public function entity2(User $user, Role $role) |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @Guarded() |
||
32 | * @return string |
||
33 | */ |
||
34 | public function guardedButNoName() |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | #[Guarded()] |
||
43 | public function guardedButNoNameAttribute() |
||
44 | { |
||
45 | return 'ok'; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @Guarded("do") |
||
50 | * @return string |
||
51 | */ |
||
52 | public function do() |
||
53 | { |
||
54 | return 'ok'; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | #[Guarded(permission: 'do')] |
||
64 | } |
||
65 | } |
||
66 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.