Passed
Push — main ( a17612...9cf3c8 )
by Tan
03:28 queued 01:30
created

BotException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A editMessageText() 0 3 1
A editMessageReplyMarkup() 0 3 1
1
<?php
2
3
namespace CSlant\TelegramGitNotifier\Exceptions;
4
5
use Exception;
6
7
final class BotException extends TelegramGitNotifierException
8
{
9
    public static function editMessageText(Exception $exception): self
10
    {
11
        return new self('Error editing message text: ' . $exception->getMessage());
12
    }
13
14
    public static function editMessageReplyMarkup(Exception $exception): self
15
    {
16
        return new self('Error sending message: ' . $exception->getMessage());
17
    }
18
}
19