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

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

24 Feb 2025 09:57PM UTC coverage: 45.13% (-0.1%) from 45.277%
13508657684

Pull #184

github

web-flow
Merge 265b9b845 into a782f5d90
Pull Request #184: Laravel 12 Support

0 of 4 new or added lines in 2 files covered. (0.0%)

1 existing line in 1 file now uncovered.

278 of 616 relevant lines covered (45.13%)

14.48 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\EventHub;
7

8
class TopicOverview extends Command
9
{
10
    protected $signature = 'eventhub:topic:status {duration?}';
11

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

14
    protected $topic_api;
15

16
    public function __construct(EventHub\Topic $topic_api)
17
    {
18
        parent::__construct();
×
19

20
        $this->topic_api = $topic_api;
×
21
    } // end __construct
22

23
    public function handle()
24
    {
25
        $duration = $this->argument('duration');
×
26
        if ($duration !== null) {
×
27
            $duration = (int) $duration;
×
28
        }
29

30
        $topics = $this->topic_api->listAll($duration);
×
31
        $topic_count = count($topics);
×
32

33
        if ($topic_count === 0) {
×
34
            $this->error('You have no topics available.');
×
35

36
            return 1;
×
37
        }
38

39
        foreach ($topics as $topic_detail) {
×
40
            $this->info(vsprintf('<fg=yellow;options=bold,underscore>Topic %s</>', [$topic_detail['topicName']]));
×
41
            $this->line('');
×
42

43
            $fields = collect($topic_detail)->only(['timeToLive', 'enqueueCount']);
×
44
            foreach ($fields as $key => $value) {
×
45
                $this->line("<fg=yellow>$key</>: $value");
×
46
            }
47

48
            $this->line('');
×
49
            $this->comment('Subscribers');
×
50

51
            $subscriber_data = collect($topic_detail['subscribers'])->map(function ($sub) {
×
52
                return collect($sub)->only(['eventHubAccount', 'name', 'alertAddress']);
×
53
            });
×
54
            $this->table(['Subscriber', 'Contact', 'Queue Name'], $subscriber_data);
×
55

56
            $this->line('');
×
57
        }
58

59
        return 0;
×
60
    } // end handle
61

62
} // end TopicOverview
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

© 2025 Coveralls, Inc