Skip to content

Commit 60c325c

Browse files
committed
Fixed minor bugs
1 parent 22d48da commit 60c325c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Helpers/Helpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ function fetchPermission(int $permission_id) : Object | null
247247
{
248248
$permission = \Obrainwave\AccessTree\Models\Permission::find($permission_id);
249249

250-
return $permission ? collect($permission) : null;
250+
return $permission ?? null;
251251
}
252252

253253
function fetchRoles(int $status = null) : Object
@@ -266,7 +266,7 @@ function fetchRole(int $role_id) : Object | null
266266
{
267267
$role = \Obrainwave\AccessTree\Models\Role::find($role_id);
268268

269-
return $role ? collect($role) : null;
269+
return $role ?? null;
270270
}
271271

272272
function fetchUserRoles(int $user_id) : Object

0 commit comments

Comments
 (0)