Message   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A type() 0 3 1
A __construct() 0 4 1
A context() 0 3 1
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