| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 10 | public function getAccessibleSubQuery(?\Ecodev\Felix\Model\User $user): string |
|
| 23 | { |
||
| 24 | 10 | if (!$user) { |
|
| 25 | 1 | return '-1'; |
|
| 26 | } |
||
| 27 | |||
| 28 | 9 | if (in_array($user->getRole(), [User::ROLE_ACCOUNTING_VERIFICATOR, User::ROLE_RESPONSIBLE, User::ROLE_ADMINISTRATOR], true)) { |
|
| 29 | 6 | return ''; |
|
| 30 | } |
||
| 31 | |||
| 32 | 3 | return $this->getAllIdsForFamilyQuery($user); |
|
| 33 | } |
||
| 35 |