| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 1 | public function getUserRoles(int $userId): array|false |
|
| 23 | { |
||
| 24 | 1 | $stmt = $this->pdo->prepare('SELECT r.role_name FROM user_roles ur |
|
| 25 | JOIN roles r ON ur.role_id = r.role_id |
||
| 26 | 1 | WHERE ur.user_id = ?'); |
|
| 27 | 1 | $stmt->execute([$userId]); |
|
| 28 | 1 | return $stmt->fetchAll(PDO::FETCH_COLUMN, 0); |
|
| 29 | } |
||
| 31 |