Skip to content

Commit

Permalink
Merge pull request #43 from agungsugiarto/analysis-OMx1KR
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
agungsugiarto authored Apr 5, 2020
2 parents d2099d4 + a0aeb74 commit db0bd50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Models/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ class Group extends GroupModel
*/
public function getPermissionsForGroup(int $groupId): array
{
$permissions = $this->db->table('auth_groups')
$permissions = $this->db->table('auth_groups')
->select('auth_permissions.id, auth_permissions.name, auth_permissions.description')
->join('auth_groups_permissions', 'auth_groups_permissions.group_id = auth_groups.id', 'inner')
->join('auth_permissions', 'auth_permissions.id = auth_groups_permissions.permission_id', 'inner')
->where('auth_groups.id', $groupId)
->get()
->getResultObject();

$found = [];
$found = [];
foreach ($permissions as $row) {
$found[$row->id] = strtolower($row->name);
$found[$row->id] = strtolower($row->name);
}

return $found;
Expand Down

0 comments on commit db0bd50

Please sign in to comment.