Passed
Push — master ( 26669d...eddd64 )
by
unknown
04:41
created

ReceivedMessage   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Test Coverage

Coverage 63.64%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
eloc 22
c 1
b 0
f 0
dl 0
loc 61
ccs 14
cts 22
cp 0.6364
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getHeaders() 0 3 1
A __construct() 0 16 1
A getEvent() 0 3 1
A getMetadata() 0 3 1
A getAttributes() 0 3 1
A getAppId() 0 3 1
A getModel() 0 3 1
A getVersion() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Umbrellio\TableSync\Messages;
6
7
class ReceivedMessage
8
{
9
    private $event;
10
    private $model;
11
    private $attributes;
12
    private $version;
13
    private $metadata;
14
    private $appId;
15
    private $headers;
16
17 6
    public function __construct(
18
        string $event,
19
        string $model,
20
        array $attributes,
21
        float $version,
22
        array $metadata,
23
        string $appId,
24
        array $headers = []
25
    ) {
26 6
        $this->event = $event;
27 6
        $this->model = $model;
28 6
        $this->attributes = $attributes;
29 6
        $this->version = $version;
30 6
        $this->metadata = $metadata;
31 6
        $this->appId = $appId;
32 6
        $this->headers = $headers;
33
    }
34
35
    public function getEvent(): string
36
    {
37
        return $this->event;
38
    }
39
40 6
    public function getModel(): string
41
    {
42 6
        return $this->model;
43
    }
44
45 3
    public function getAttributes(): array
46
    {
47 3
        return $this->attributes;
48
    }
49
50
    public function getVersion(): float
51
    {
52
        return $this->version;
53
    }
54
55
    public function getMetadata(): array
56
    {
57
        return $this->metadata;
58
    }
59
60 2
    public function getAppId(): string
61
    {
62 2
        return $this->appId;
63
    }
64
65
    public function getHeaders(): array
66
    {
67
        return $this->headers;
68
    }
69
}
70