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

SubscriptionRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 38
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A getData() 0 3 1
A __construct() 0 4 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;
12
13
/**
14
 * The subscriptions request is launched when
15
 * internally the subscriptions manager dispatch subscriptions
16
 * in order to emulate user like requests
17
 */
18
class SubscriptionRequest
19
{
20
    /**
21
     * @var string
22
     */
23
    protected $id;
24
25
    /**
26
     * @var array
27
     */
28
    protected $data = [];
29
30
    /**
31
     * SubscriptionRequest constructor.
32
     *
33
     * @param string $id
34
     * @param array  $data
35
     */
36
    public function __construct(string $id, array $data = [])
37
    {
38
        $this->id = $id;
39
        $this->data = $data;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getId(): string
46
    {
47
        return $this->id;
48
    }
49
50
    /**
51
     * @return array
52
     */
53
    public function getData(): array
54
    {
55
        return $this->data;
56
    }
57
}
58