Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function loadAll(): array |
||
31 | { |
||
32 | $query = (new QueryBuilder()) |
||
33 | ->select('ug.identifier AS v0', 'ar.identifier AS v1') |
||
34 | ->from('user_groups_admin_resources', 'ugar') |
||
35 | ->innerJoin('admin_resources', 'ar', 'ugar.admin_resource_id = ar.id AND ar.deleted_at IS NULL') |
||
36 | ->innerJoin('user_groups', 'ug', 'ugar.user_group_id = ug.id AND ug.deleted_at IS NULL') |
||
37 | ; |
||
38 | |||
39 | $connection = $this->connectionPool->getReadConnection(); |
||
40 | $statement = $connection->prepare($query->getSql()); |
||
41 | $statement->bindValues($query->getParameters()); |
||
42 | if (!$statement->execute()) { |
||
43 | throw new Database($statement->errorInfo()); |
||
44 | } |
||
45 | |||
46 | return $statement->fetchAll(\PDO::FETCH_ASSOC); |
||
47 | } |
||
49 |