Webhook::type()   A
last analyzed

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
4
namespace SirSova\Webhooks;
5
6
class Webhook
7
{
8
9
    /**
10
     * @var Message
11
     */
12
    private $message;
13
    /**
14
     * @var string
15
     */
16
    private $url;
17
18
    public function __construct(Message $message, string $url)
19
    {
20
        $this->message = $message;
21
        $this->url = $url;
22
    }
23
24
    /**
25
     * @return array|\JsonSerializable
26
     */
27
    public function context()
28
    {
29
        return $this->message->context();
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function type(): string
36
    {
37
        return $this->message->type();
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function url(): string
44
    {
45
        return $this->url;
46
    }
47
}
48