Total Complexity | 4 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class CreateSubscriber extends Command |
||
11 | { |
||
12 | /** |
||
13 | * The name and signature of the console command. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $signature = 'webhooks:subscriber |
||
18 | {event : Subscriber name} |
||
19 | {url : Webhook target url} |
||
20 | {--disabled : Set status `enabled` false}'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'Create a new webhook subscriber'; |
||
28 | |||
29 | /** |
||
30 | * @var SubscriberRepository |
||
31 | */ |
||
32 | protected $subscriberRepository; |
||
33 | |||
34 | public function __construct(SubscriberRepository $subscriberRepository) |
||
35 | { |
||
36 | parent::__construct(); |
||
37 | |||
38 | $this->subscriberRepository = $subscriberRepository; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return int |
||
43 | */ |
||
44 | public function handle(): int |
||
63 | } |
||
64 | } |
||
65 |