refactor(support): complete toIntIds() rollout in tenant-area code
Final pass over tenant repositories and TenantScopeService, collapsing the remaining two-line intval+filter and one-line intval+unique patterns onto the shared `toIntIds()` helper. The inline pattern is now gone from the codebase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,8 +24,7 @@ class TenantCustomFieldOptionRepository implements TenantCustomFieldOptionReposi
|
||||
|
||||
public function listByDefinitionIds(array $definitionIds, bool $onlyActive = true): array
|
||||
{
|
||||
$definitionIds = array_values(array_unique(array_map('intval', $definitionIds)));
|
||||
$definitionIds = array_values(array_filter($definitionIds, static fn ($id) => $id > 0));
|
||||
$definitionIds = toIntIds($definitionIds);
|
||||
if (!$definitionIds) {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user