• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / Iznik / 11263

08 May 2026 09:16AM UTC coverage: 68.914% (-3.9%) from 72.769%
11263

push

circleci

edwh
fix(batch): disable newly merged migration commands pending sign-off

Commands added by PRs #391-#398 are migrated and tested but not yet
enabled in production: users:remove-spammers, mail:mod-notifs,
users:update-modmails, chats:update-expected, chats:process-spam,
donations:update-giftaid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

9127 of 10554 branches covered (86.48%)

Branch coverage included in aggregate %.

100214 of 148108 relevant lines covered (67.66%)

19.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.47
/iznik-batch/app/Console/Commands/User/ProcessBouncedEmailsCommand.php
1
<?php
2

3
namespace App\Console\Commands\User;
4

5
use App\Console\Concerns\PreventsOverlapping;
6
use App\Services\Mail\Incoming\BounceService;
7
use App\Services\UserManagementService;
8
use Illuminate\Console\Command;
9
use Illuminate\Support\Facades\Log;
10

11
class ProcessBouncedEmailsCommand extends Command
12
{
13
    use PreventsOverlapping;
14

15
    protected $signature = 'mail:bounced {--dry-run : Show what would be processed without making changes}';
16

17
    protected $description = 'Process bounced emails and mark them as invalid';
18

19
    public function handle(UserManagementService $userService, BounceService $bounceService): int
5✔
20
    {
21
        if (! $this->acquireLock()) {
5✔
22
            $this->info('Already running, exiting.');
×
23

24
            return Command::SUCCESS;
×
25
        }
26

27
        try {
28
            $dryRun = $this->option('dry-run');
5✔
29

30
            if ($dryRun) {
5✔
31
                $this->info('DRY RUN — no changes will be made.');
1✔
32

33
                return Command::SUCCESS;
1✔
34
            }
35

36
            Log::info('Starting bounced email processing');
4✔
37
            $this->info('Processing bounced emails...');
4✔
38

39
            $stats = $userService->processBouncedEmails(false);
4✔
40

41
            $this->info("Processed: {$stats['processed']}");
4✔
42
            $this->info("Marked invalid: {$stats['marked_invalid']}");
4✔
43

44
            Log::info('Bounced email processing complete', $stats);
4✔
45

46
            $this->info('Suspending users with excessive bounces...');
4✔
47
            $suspended = $bounceService->suspendBouncingUsers();
4✔
48
            $this->info("Suspended: {$suspended}");
4✔
49

50
            return Command::SUCCESS;
4✔
51
        } finally {
52
            $this->releaseLock();
5✔
53
        }
54
    }
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc