php-commerce/Console/MatureReferralCommissions.php
Claude 082be5ad90
Some checks failed
CI / tests (push) Failing after 1m25s
chore: fix pint code style and add test config
Add phpunit.xml and tests/Pest.php for standalone test execution.
Apply Laravel Pint formatting fixes across all source files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 03:50:05 +00:00

29 lines
702 B
PHP

<?php
declare(strict_types=1);
namespace Core\Mod\Commerce\Console;
use Core\Mod\Commerce\Services\ReferralService;
use Illuminate\Console\Command;
/**
* Mature referral commissions that are past their maturation date.
*
* Should be run daily via scheduler.
*/
class MatureReferralCommissions extends Command
{
protected $signature = 'commerce:mature-commissions';
protected $description = 'Mature referral commissions that are past their maturation date';
public function handle(ReferralService $referralService): int
{
$count = $referralService->matureReadyCommissions();
$this->info("Matured {$count} commissions.");
return self::SUCCESS;
}
}