Skip to content

Commit 5b66bc3

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 87d6c43 + b2916f3 commit 5b66bc3

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/Filament/Pages/Health.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public function fixAction(): Action
115115

116116
case 'content_hierarchy':
117117
$needRefresh = $this->fixContentHierarchy();
118+
118119
break;
119120

120121
}
@@ -166,7 +167,7 @@ protected function getContentHierarchyStatusData(): array
166167
$records = InspireCmsConfig::getNestableTreeModelClass()::scoped([
167168
'nestable_type' => app(InspireCmsConfig::getContentModelClass())->getMorphClass(),
168169
])->with([
169-
'nestable.path',
170+
'nestable.path',
170171
'nestable.ancestorsAndSelf',
171172
])->get();
172173

@@ -186,26 +187,27 @@ protected function getContentHierarchyStatusData(): array
186187
->all();
187188

188189
$valids = collect($data)->filter(function ($item) {
189-
return $item['current_path'] === $item['expected_path'] &&
190+
return $item['current_path'] === $item['expected_path'] &&
190191
$item['parent_id_from_tree'] === $item['parent_id_from_content'];
191192
})->all();
192193

193-
$invalids = collect($data)
194+
$invalids = collect($data)
194195
->where(fn ($item, $key) => array_key_exists($key, $valids) === false)
195196
->all();
196197

197198
return [
198199
'status' => $this->formateStatusData(count($data), count($invalids), count($valids)),
199-
'data' => $this->formateStatusContent(collect($invalids)
200-
->mapWithKeys(function ($item) {
201-
return [
202-
'Content ID: '. $item['id'] => [
203-
'Current path: ' . $item['current_path'],
204-
'Expected path: ' . $item['expected_path'],
205-
],
206-
];
207-
})
208-
->all()
200+
'data' => $this->formateStatusContent(
201+
collect($invalids)
202+
->mapWithKeys(function ($item) {
203+
return [
204+
'Content ID: ' . $item['id'] => [
205+
'Current path: ' . $item['current_path'],
206+
'Expected path: ' . $item['expected_path'],
207+
],
208+
];
209+
})
210+
->all()
209211
),
210212
];
211213
}

0 commit comments

Comments
 (0)