Passed
Pull Request — main (#58)
by
unknown
02:46
created

WebhookService::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 2
rs 10
1
<?php
2
3
namespace CSlant\LaravelTelegramGitNotifier\Services;
4
5
use CSlant\LaravelTelegramGitNotifier\Http\Actions\WebhookAction;
6
use CSlant\TelegramGitNotifier\Exceptions\WebhookException;
7
8
class WebhookService
9
{
10
    protected WebhookAction $webhookAction;
11
12
    public function __construct(WebhookAction $webhookAction) {
13
        $this->webhookAction = $webhookAction;
14
    }
15
16
17
    /**
18
     * @throws WebhookException
19
     */
20
    public function handle(): string
21
    {
22
        return $this->webhookAction->set();
23
    }
24
}
25