update rm deadcode

This commit is contained in:
baodev0
2026-09-27 11:42:40 +07:00
parent 82a71244ca
commit 3af59bd9c5
129 changed files with 5194 additions and 2698 deletions
@@ -17,11 +17,17 @@ class ProductCategoryTransformer
$row = (array) $row;
$legacyId = (int) $row['id'];
$name = $row['name'] ?: "WHMCS Group {$legacyId}";
$candidate = $row['slug'] ?: $name;
$adoptId = $this->slugs->adoptableId('product_categories', 'slug', $candidate);
return new ProductCategoryData(
legacyId: $legacyId,
adoptId: $adoptId,
name: $name,
slug: $this->slugs->unique('product_categories', 'slug', $row['slug'] ?: $name, $legacyId),
slug: $adoptId
? (Str::slug($candidate) ?: 'item')
: $this->slugs->unique('product_categories', 'slug', $candidate, $legacyId),
type: $this->guessType($name),
isActive: ! $row['hidden'],
sortOrder: (int) $row['order'],