Completed
Pull Request — master (#13)
by Rafael
06:46
created

SubscriptionMessage   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 83
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 6
eloc 16
dl 0
loc 83
ccs 0
cts 27
cp 0
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getFilters() 0 3 1
A getData() 0 3 1
A getMeta() 0 3 1
A getId() 0 3 1
A getChannel() 0 3 1
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Subscription\PubSub;
12
13
class SubscriptionMessage
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $channel;
19
20
    /**
21
     * @var string
22
     */
23
    protected $id;
24
25
    /**
26
     * @var array
27
     */
28
    protected $filters = [];
29
30
    /**
31
     * @var array
32
     */
33
    protected $data = [];
34
35
    /**
36
     * @var array
37
     */
38
    protected $meta = [];
39
40
    /**
41
     * SubscriptionMessage constructor.
42
     *
43
     * @param string $channel
44
     * @param string $id
45
     * @param array  $data
46
     * @param array  $filters
47
     * @param array  $meta
48
     */
49
    public function __construct(string $channel, string $id, array $data, array $filters, array $meta)
50
    {
51
        $this->channel = $channel;
52
        $this->id = $id;
53
        $this->data = $data;
54
        $this->filters = $filters;
55
        $this->meta = $meta;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getChannel(): string
62
    {
63
        return $this->channel;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getId(): string
70
    {
71
        return $this->id;
72
    }
73
74
    /**
75
     * @return array
76
     */
77
    public function getData(): array
78
    {
79
        return $this->data;
80
    }
81
82
    /**
83
     * @return array
84
     */
85
    public function getFilters(): array
86
    {
87
        return $this->filters;
88
    }
89
90
    /**
91
     * @return array
92
     */
93
    public function getMeta(): array
94
    {
95
        return $this->meta;
96
    }
97
}
98