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

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

06 Feb 2024 07:28PM UTC coverage: 45.675% (-0.2%) from 45.913%
7805057844

push

github

web-flow
Housekeeping (#162)

11 of 35 new or added lines in 14 files covered. (31.43%)

9 existing lines in 7 files now uncovered.

264 of 578 relevant lines covered (45.67%)

14.07 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
class WebhookStatus extends Command
9
{
10
    protected $signature = 'eventhub:webhook:status';
11

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

14
    protected $webhook_api;
15

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

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

23
    public function handle()
24
    {
25
        $registered_hooks = $this->webhook_api->listAll();
×
NEW
26
        if (count($registered_hooks['webhooks']) === 0) {
×
27
            $this->error('You do not have any webhooks registered.');
×
28

UNCOV
29
            return 1;
×
30
        }
31

32
        $hooks = [];
×
33
        foreach ($registered_hooks['webhooks'] as $possible_hook) {
×
34
            $queue_name = $possible_hook['topicName'];
×
35

36
            $details = $this->webhook_api->getInfo($queue_name);
×
37
            $hooks[$queue_name] = [
×
38
                'queue' => $queue_name,
×
39
                'endpoint' => $details['endpoint'],
×
40
                'active' => $details['active'] === false ? 'Paused' : 'Active',
×
41
            ];
×
42
        }
43

44
        $this->table(['Queue', 'Endpoint', 'Active'], $hooks);
×
45

46
        return 0;
×
47
    } // end handle
48

49
} // end WebhookStatus
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