Passed
Push — main ( ef2030...a17612 )
by Tan
15:25 queued 13:15
created

WebhookException   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getWebHookInfo() 0 3 1
A delete() 0 3 1
A getUpdates() 0 3 1
A set() 0 3 1
1
<?php
2
3
namespace CSlant\TelegramGitNotifier\Exceptions;
4
5
final class WebhookException extends TelegramGitNotifierException
6
{
7
    public static function set(): self
8
    {
9
        return new self('Something went wrong while setting webhook. Check your bot token and app url!');
10
    }
11
12
    public static function delete(): self
13
    {
14
        return new self('Something went wrong while deleting webhook. Check your bot token and app url!');
15
    }
16
17
    public static function getUpdates(): self
18
    {
19
        return new self('Something went wrong while getting updates. Check your bot token and app url!');
20
    }
21
22
    public static function getWebHookInfo(): self
23
    {
24
        return new self('Something went wrong while getting webhook info. Check your bot token and app url!');
25
    }
26
}
27