• 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

22.73
/iznik-batch/app/Console/Commands/Data/FetchAppVersionsCommand.php
1
<?php
2

3
namespace App\Console\Commands\Data;
4

5
use App\Services\AppVersionFetcherService;
6
use Illuminate\Console\Command;
7
use Illuminate\Support\Facades\DB;
8
use Illuminate\Support\Facades\Log;
9

10
class FetchAppVersionsCommand extends Command
11
{
12
    protected $signature = 'data:fetch-app-versions
13
                            {--dry-run : Show what would be fetched without making changes}';
14

15
    protected $description = 'Fetch latest iOS and Android app versions from app stores and store in config';
16

17
    public function handle(AppVersionFetcherService $service): int
1✔
18
    {
19
        $dryRun = (bool) $this->option('dry-run');
1✔
20

21
        if ($dryRun) {
1✔
22
            $this->info('Dry run — fetching versions but not writing to config.');
1✔
23
        } else {
UNCOV
24
            Log::info('FetchAppVersions: Starting');
×
25
        }
26

27
        $result = $service->fetchAll($dryRun);
1✔
28

29
        $this->info('Fetched: ' . implode(', ', $result['fetched']));
×
30

UNCOV
31
        if (!empty($result['failed'])) {
×
UNCOV
32
            $this->warn('Failed: ' . implode(', ', $result['failed']));
×
33
        }
34

35
        if (!empty($result['writes'])) {
×
UNCOV
36
            $current = DB::table('config')
×
UNCOV
37
                ->whereIn('key', array_keys($result['writes']))
×
UNCOV
38
                ->pluck('value', 'key')
×
UNCOV
39
                ->all();
×
40

UNCOV
41
            $this->line($dryRun ? 'Would write:' : 'Wrote:');
×
UNCOV
42
            foreach ($result['writes'] as $key => $value) {
×
UNCOV
43
                $old = $current[$key] ?? '(unset)';
×
UNCOV
44
                $marker = ($old === $value) ? '=' : '→';
×
UNCOV
45
                $this->line(sprintf('  %s  %-40s  %s %s %s', $marker, $key, $old, $marker === '=' ? '==' : '→', $value));
×
46
            }
47
        }
48

UNCOV
49
        if (!$dryRun) {
×
UNCOV
50
            Log::info('FetchAppVersions: Done', $result);
×
51
        }
52

UNCOV
53
        return Command::SUCCESS;
×
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