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

WebhookService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A handle() 0 3 1
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