From e9ecd73258b95d4596f6b5edda03a10edcf978c2 Mon Sep 17 00:00:00 2001 From: Martin Zurowietz Date: Thu, 19 Dec 2024 16:52:29 +0100 Subject: [PATCH] Fix CS again --- app/Console/Commands/SyncUuids.php | 3 +-- app/Services/Export/LabelTreeExport.php | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/SyncUuids.php b/app/Console/Commands/SyncUuids.php index 8263bdb40..3e4a16a98 100644 --- a/app/Console/Commands/SyncUuids.php +++ b/app/Console/Commands/SyncUuids.php @@ -115,8 +115,7 @@ protected function generateOutput() 'lastname' => Hash::make($user->lastname), 'email' => Hash::make($user->email), ]; - }) - ->toJson(JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + })->toJson(JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); $bar->finish(); echo $users; diff --git a/app/Services/Export/LabelTreeExport.php b/app/Services/Export/LabelTreeExport.php index 7c028e072..02aed8aed 100644 --- a/app/Services/Export/LabelTreeExport.php +++ b/app/Services/Export/LabelTreeExport.php @@ -12,8 +12,11 @@ class LabelTreeExport extends Export */ public function getContent() { - $trees = - LabelTree::where(function ($query) { + $trees = LabelTree::with('labels', 'version') + ->with(['members' => function ($query) { + $query->select('users.id', 'label_tree_user.role_id'); + }]) + ->where(function ($query) { $query->whereIn('id', $this->ids) // Also add master trees of all included versioned trees. ->orWhereIn('id', function ($query) { @@ -23,10 +26,6 @@ public function getContent() ->whereIn('label_trees.id', $this->ids); }); }) - ->with('labels', 'version') - ->with(['members' => function ($query) { - $query->select('users.id', 'label_tree_user.role_id'); - }]) ->get(); $trees->each(function ($tree) {