File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ class SetWebhook extends Command
30
30
public function handle (): void
31
31
{
32
32
try {
33
- $ log = ( new WebhookService ())-> setWebhook ();
33
+ $ webhookService = new WebhookService ();
34
34
35
- $ this ->info ($ log );
35
+ $ this ->info ($ webhookService -> setWebhook () );
36
36
} catch (WebhookException $ e ) {
37
37
$ this ->error ($ e ->getMessage ());
38
38
}
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ class WebhookService
9
9
{
10
10
protected Webhook $ webhook ;
11
11
12
- public function __construct ()
12
+ public function __construct (? Webhook $ webhook = null )
13
13
{
14
- $ this ->webhook = new Webhook ();
14
+ $ this ->webhook = $ webhook ?? new Webhook ();
15
15
$ this ->webhook ->setToken (config ('telegram-git-notifier.bot.token ' ));
16
16
$ this ->webhook ->setUrl (config ('telegram-git-notifier.app.url ' ));
17
17
}
You can’t perform that action at this time.
0 commit comments