Conditions | 5 |
Paths | 4 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | private function hasAccessToIntegrations(User $authUser, $integrations): bool |
||
50 | { |
||
51 | if ($authUser->toEntity()->isAdministrator()) { |
||
52 | return true; |
||
53 | } |
||
54 | |||
55 | if ($integrations instanceof User && $authUser->id === optional($integrations)->id) { |
||
56 | return true; |
||
57 | } |
||
58 | |||
59 | if ($authUser->id === optional($integrations)->created_by_user_id) { |
||
60 | return true; |
||
61 | } |
||
62 | |||
63 | return false; |
||
64 | } |
||
65 | |||
90 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.