Passed
Branch master (f22fa7)
by Stan
04:08
created

NotifableTelegramChannel::getMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
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 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Skater4\LaravelSentryNotifications\Notifications\Services\Telegram\Entities;
4
5
use Illuminate\Notifications\Notifiable;
6
use Skater4\LaravelSentryNotifications\Notifications\Interfaces\NotifableEntityInterface;
7
8
class NotifableTelegramChannel implements NotifableEntityInterface
9
{
10
    use Notifiable;
0 ignored issues
show
Bug introduced by
The trait Illuminate\Notifications\Notifiable requires the property $email which is not provided by Skater4\LaravelSentryNot...otifableTelegramChannel.
Loading history...
11
12
    private $chatId;
13
    private $eventUrl;
14
    private $message;
15
16
    /**
17
     * @param string $chatId
18
     * @param string $eventUrl
19
     * @param string $message
20
     */
21
    public function __construct(
22
        string $chatId,
23
        string $message = '',
24
        string $eventUrl = ''
25
    )
26
    {
27
        $this->chatId   = $chatId;
28
        $this->eventUrl = $eventUrl;
29
        $this->message  = $message;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getChatId(): string
36
    {
37
        return $this->chatId;
38
    }
39
40
    /**
41
     * @param string $eventUrl
42
     * @return void
43
     */
44
    public function setEventUrl(string $eventUrl): void
45
    {
46
        $this->eventUrl = $eventUrl;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getEventUrl(): string
53
    {
54
        return $this->eventUrl;
55
    }
56
57
    /**
58
     * @param string $message
59
     * @return void
60
     */
61
    public function setMessage(string $message): void
62
    {
63
        $this->message = $message;
64
    }
65
    /**
66
     * @return string
67
     */
68
    public function getMessage(): string
69
    {
70
        return $this->message;
71
    }
72
73
    /**
74
     * @return string
75
     */
76
    public function getKey(): string
77
    {
78
        return $this->chatId;
79
    }
80
}
81