fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -11,12 +11,11 @@ class MessageQueryService
public function getUserRoleName(int $userId): ?string
{
$user = User::query()->with('roles')->find($userId);
if (! $user) {
if (!$user) {
return null;
}
$role = $user->roles->sortBy('id')->first();
return $role ? (string) $role->name : null;
}
@@ -68,7 +67,7 @@ class MessageQueryService
->pluck('id')
->all();
if (! empty($ids)) {
if (!empty($ids)) {
Message::query()
->whereIn('id', $ids)
->update([
@@ -91,7 +90,7 @@ class MessageQueryService
{
$query = Message::query()->with(['sender', 'recipient']);
if (! empty($filters['priority'])) {
if (!empty($filters['priority'])) {
$query->where('priority', $filters['priority']);
}
@@ -99,8 +98,8 @@ class MessageQueryService
$query->where('read_status', (int) $filters['read_status']);
}
if (! empty($filters['search'])) {
$term = '%'.$filters['search'].'%';
if (!empty($filters['search'])) {
$term = '%' . $filters['search'] . '%';
$query->where(function ($q) use ($term) {
$q->where('subject', 'like', $term)
->orWhere('message', 'like', $term);