From bcf401c98aeb655de11689301dd6c3f8aca7c1d3 Mon Sep 17 00:00:00 2001 From: Ernest Walzel Date: Fri, 15 Mar 2024 20:40:31 +0100 Subject: [PATCH] Linting --- .../Admin/Authority/RoleTranslationsController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Admin/Authority/RoleTranslationsController.php b/app/Http/Controllers/Admin/Authority/RoleTranslationsController.php index e42a9c327..aa0f66e89 100644 --- a/app/Http/Controllers/Admin/Authority/RoleTranslationsController.php +++ b/app/Http/Controllers/Admin/Authority/RoleTranslationsController.php @@ -53,20 +53,20 @@ private function getTranslations() ->whereNotNull('roles') ->distinct() ->pluck('roles') - ->reduce(fn(Collection $carry, array $row) => $carry->concat($row), collect()) + ->flatten() ->unique() ->sort() ->map(function (string $id) { return (object) [ 'id' => $id, 'sk' => Lang::hasForLocale("authority.roles.{$id}", 'sk') - ? Lang::get("authority.roles.{$id}", [], 'sk') + ? Lang::get("authority.roles.{$id}", locale: 'sk') : null, 'cs' => Lang::hasForLocale("authority.roles.{$id}", 'cs') - ? Lang::get("authority.roles.{$id}", [], 'cs') + ? Lang::get("authority.roles.{$id}", locale: 'cs') : null, 'en' => Lang::hasForLocale("authority.roles.{$id}", 'en') - ? Lang::get("authority.roles.{$id}", [], 'en') + ? Lang::get("authority.roles.{$id}", locale: 'en') : null, ]; });