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

Freegle / Iznik / 11342

08 May 2026 02:47PM UTC coverage: 68.97% (-3.8%) from 72.761%
11342

push

circleci

web-flow
Merge pull request #403 from Freegle/feature/exports-migration

feat(batch): migrate exports.php to users:process-exports

9127 of 10554 branches covered (86.48%)

Branch coverage included in aggregate %.

400 of 452 new or added lines in 2 files covered. (88.5%)

12172 existing lines in 167 files now uncovered.

100855 of 148909 relevant lines covered (67.73%)

19.62 hits per line

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

52.94
/iznik-batch/app/Console/Commands/Chat/UpdateChatExpectedCommand.php
1
<?php
2

3
namespace App\Console\Commands\Chat;
4

5
use App\Services\ChatExpectedService;
6
use App\Traits\GracefulShutdown;
7
use App\Traits\LogsBatchJob;
8
use Illuminate\Console\Command;
9
use Illuminate\Support\Facades\Log;
10

11
class UpdateChatExpectedCommand extends Command
12
{
13
    use GracefulShutdown, LogsBatchJob;
14

15
    protected $signature = 'chats:update-expected
16
                            {--dry-run : Show what would be done without actually changing}';
17

18
    protected $description = 'Update chat reply-expectation tracking and per-user reply-time metrics';
19

20
    public function handle(ChatExpectedService $service): int
1✔
21
    {
22
        $this->registerShutdownHandlers();
1✔
23

24
        $dryRun = (bool) $this->option('dry-run');
1✔
25

26
        if ($dryRun) {
1✔
27
            $this->info('DRY RUN — counting changes but not writing.');
1✔
28
        }
29

30
        return $this->runWithLogging(function () use ($service, $dryRun) {
1✔
31
            if (!$dryRun) {
1✔
32
                Log::info('Starting chat expected update');
×
33
            }
34

35
            $stats = $service->updateChatExpected($dryRun);
1✔
36

37
            $verb = $dryRun ? 'Would clear' : 'Cleared';
×
38
            $verb2 = $dryRun ? 'Would update' : 'Expected update:';
×
UNCOV
39
            $this->info("{$verb} replyexpected for {$stats['deleted_cleared']} deleted-user messages, {$stats['spam_cleared']} spam messages.");
×
40
            $this->info("{$verb2} {$stats['waiting']} waiting, {$stats['received']} received.");
×
41

42
            if (!$dryRun) {
×
43
                Log::info('Chat expected update complete', $stats);
×
44
            }
45

UNCOV
46
            return Command::SUCCESS;
×
47
        });
1✔
48
    }
49
}
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