• 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/WebhookStatus.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
use function Laravel\Prompts\spin;
9
use function Laravel\Prompts\table;
10

11
class WebhookStatus extends Command
12
{
13
    protected $signature = 'eventhub:webhook:status';
14

15
    protected $description = 'Display information about webhook setup for any queues you can read from';
16

17
    public function __construct(
18
        protected EventHub\Webhook $webhook_api
19
    ) {
UNCOV
20
        parent::__construct();
×
21
    }
22

23
    public function handle(): int
24
    {
NEW
25
        $registered_hooks = spin(
×
NEW
26
            fn () => $this->webhook_api->listAll(),
×
NEW
27
            'Fetching webhooks...'
×
NEW
28
        );
×
29

30
        if (count($registered_hooks['webhooks']) === 0) {
×
NEW
31
            $this->components->error('You do not have any webhooks registered.');
×
32

NEW
33
            return self::FAILURE;
×
34
        }
35

36
        $hooks = [];
×
37
        foreach ($registered_hooks['webhooks'] as $possible_hook) {
×
38
            $queue_name = $possible_hook['topicName'];
×
39

NEW
40
            $details = spin(
×
NEW
41
                fn () => $this->webhook_api->getInfo($queue_name),
×
NEW
42
                "Fetching details for {$queue_name}..."
×
NEW
43
            );
×
44

45
            $hooks[$queue_name] = [
×
46
                'queue' => $queue_name,
×
47
                'endpoint' => $details['endpoint'],
×
NEW
48
                'active' => $details['active'] === false ? '<fg=red>Paused</>' : '<fg=green>Active</>',
×
49
            ];
×
50
        }
51

NEW
52
        $this->newLine();
×
NEW
53
        table(
×
NEW
54
            headers: ['Queue', 'Endpoint', 'Status'],
×
NEW
55
            rows: array_values(array_map(fn ($h) => array_values($h), $hooks))
×
NEW
56
        );
×
57

NEW
58
        return self::SUCCESS;
×
59
    }
60
}
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