This commit is contained in:
Mark Gregory
2026-09-30 10:45:45 +01:00
parent 59aa1e1392
commit c045f66256
8 changed files with 335 additions and 0 deletions
@@ -0,0 +1,20 @@
<?php
namespace App\Console\Commands;
use App\Services\Licensing\LicenseDeliveryService;
use Illuminate\Console\Command;
final class SonarDeskLicenseDeliver extends Command
{
protected $signature = 'sonardesk:license-deliver {--limit=50 : Maximum pending licence emails to send}';
protected $description = 'Deliver pending SonarDesk licence-key emails';
public function handle(LicenseDeliveryService $delivery): int
{
$limit = max(1, min((int) $this->option('limit'), 100));
$count = $delivery->deliverPending($limit);
$this->info("Delivered {$count} licence email(s).");
return self::SUCCESS;
}
}