fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -9,6 +9,7 @@ use Illuminate\Console\Command;
class SendMonthlyPaymentNotificationsCommand extends Command
{
protected $signature = 'payments:monthly-reminder {--force} {--email=} {--type=}';
protected $description = 'Send monthly payment reminders on the first Saturday of every month.';
public function handle(PaymentNotificationService $service): int
@@ -19,8 +20,9 @@ class SendMonthlyPaymentNotificationsCommand extends Command
if ($email !== '') {
$user = User::query()->where('email', $email)->first();
if (!$user) {
if (! $user) {
$this->error('Invalid --email provided.');
return self::FAILURE;
}
@@ -30,12 +32,14 @@ class SendMonthlyPaymentNotificationsCommand extends Command
'force' => true,
]);
$this->info('Test reminder sent for ' . $email . '.');
$this->info('Test reminder sent for '.$email.'.');
return $result['failed'] > 0 ? self::FAILURE : self::SUCCESS;
}
if (!$force && !$this->isFirstSaturday(now())) {
if (! $force && ! $this->isFirstSaturday(now())) {
$this->info('Not the first Saturday of the month. Use --force to override.');
return self::SUCCESS;
}