TenantAtlas/apps/platform/app/Console/Commands/TenantConfigurationSyncDefaults.php
Ahmed Darrazi 6fbb5c97ad
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 5m4s
chore: complete spec 424 implementation
2026-07-01 16:40:08 +02:00

29 lines
952 B
PHP

<?php
declare(strict_types=1);
namespace App\Console\Commands;
use App\Services\TenantConfiguration\ResourceTypeRegistry;
use App\Services\TenantConfiguration\SupportedScopeResolver;
use Illuminate\Console\Command;
final class TenantConfigurationSyncDefaults extends Command
{
protected $signature = 'tenant-configuration:sync-defaults';
protected $description = 'Synchronize Coverage v2 resource type and supported scope defaults.';
public function handle(ResourceTypeRegistry $resourceTypes, SupportedScopeResolver $supportedScopes): int
{
$resourceTypes->syncDefaults();
$supportedScopes->syncDefaults();
$this->info('Tenant configuration defaults synchronized.');
$this->line(sprintf('Active resource types: %d', $resourceTypes->active()->count()));
$this->line(sprintf('Active supported scopes: %d', $supportedScopes->activeScopes()->count()));
return self::SUCCESS;
}
}