add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
@@ -9,7 +9,6 @@ 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
@@ -20,9 +19,8 @@ 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;
}
@@ -32,14 +30,12 @@ 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;
}