| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function getAccessibleSubQuery(?User $user): string |
||
| 19 | { |
||
| 20 | if (!$user) { |
||
| 21 | return '-1'; |
||
| 22 | } |
||
| 23 | |||
| 24 | if (in_array($user->getRole(), [User::ROLE_RESPONSIBLE, User::ROLE_ADMINISTRATOR], true)) { |
||
| 25 | return $this->getAllIdsQuery(); |
||
| 26 | } |
||
| 27 | |||
| 28 | return $this->getAllIdsForOwnerQuery($user); |
||
| 29 | } |
||
| 31 |