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

NIT-Administrative-Systems / SysDev-laravel-soa / 21220256475

21 Jan 2026 06:00PM UTC coverage: 38.99% (-6.1%) from 45.13%
21220256475

push

github

web-flow
EventHub command protection and restyling (#185)

0 of 189 new or added lines in 8 files covered. (0.0%)

6 existing lines in 5 files now uncovered.

278 of 713 relevant lines covered (38.99%)

12.51 hits per line

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

0.0
/src/Console/Commands/EventHub/TopicOverview.php
1
<?php
2

3
namespace Northwestern\SysDev\SOA\Console\Commands\EventHub;
4

5
use Illuminate\Console\Command;
6
use Northwestern\SysDev\SOA\Console\Commands\Concerns\FormatsCommandOutput;
7
use Northwestern\SysDev\SOA\EventHub;
8

9
use function Laravel\Prompts\note;
10
use function Laravel\Prompts\spin;
11
use function Laravel\Prompts\table;
12

13
class TopicOverview extends Command
14
{
15
    use FormatsCommandOutput;
16

17
    protected $signature = 'eventhub:topic:status {duration?}';
18

19
    protected $description = 'Display statistics & information about any topics available for publishing';
20

21
    public function __construct(protected EventHub\Topic $topic_api)
22
    {
23
        parent::__construct();
×
24
    }
25

26
    public function handle(): int
27
    {
28
        $duration = $this->argument('duration');
×
NEW
29
        $duration = $duration !== null ? (int) $duration : null;
×
30

NEW
31
        $topics = spin(
×
NEW
32
            fn () => $this->topic_api->listAll($duration),
×
NEW
33
            'Fetching topic information...'
×
NEW
34
        );
×
35

NEW
36
        if (count($topics) === 0) {
×
NEW
37
            $this->components->error('You have no topics available.');
×
38

NEW
39
            return self::FAILURE;
×
40
        }
41

42
        foreach ($topics as $topic_detail) {
×
NEW
43
            $this->divider();
×
NEW
44
            $this->newLine();
×
NEW
45
            $this->line(vsprintf(' <fg=white>Topic:</> <bg=magenta;fg=white;options=bold> %s </>', [$topic_detail['topicName']]));
×
NEW
46
            $this->newLine();
×
47

48
            $fields = collect($topic_detail)->only(['timeToLive', 'enqueueCount']);
×
49
            foreach ($fields as $key => $value) {
×
NEW
50
                $this->styledDetail($key, $value);
×
51
            }
52

NEW
53
            $this->newLine();
×
NEW
54
            note('Subscribers');
×
55

NEW
56
            $subscriber_data = collect($topic_detail['subscribers'])->map(
×
NEW
57
                fn ($sub) => array_values(collect($sub)->only(['eventHubAccount', 'name', 'alertAddress'])->all())
×
NEW
58
            );
×
59

NEW
60
            table(
×
NEW
61
                headers: ['Subscriber', 'Contact', 'Queue Name'],
×
NEW
62
                rows: $subscriber_data->values()->all()
×
NEW
63
            );
×
64
        }
65

NEW
66
        return self::SUCCESS;
×
67
    }
68
}
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