Message::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
4
namespace SirSova\Webhooks;
5
6
class Message
7
{
8
9
    /**
10
     * @var string
11
     */
12
    private $type;
13
14
    /**
15
     * @var array|\JsonSerializable
16
     */
17
    private $context;
18
    
19
    public function __construct(string $type, $context)
20
    {
21
        $this->type = $type;
22
        $this->context = $context;
23
    }
24
25
    /**
26
     * @return string
27
     */
28
    public function type(): string
29
    {
30
        return $this->type;
31
    }
32
33
    /**
34
     * @return array|\JsonSerializable
35
     */
36
    public function context()
37
    {
38
        return $this->context;
39
    }
40
}
41