WebhookEvent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 53
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getResource() 0 3 1
A getStore() 0 3 1
A getTopic() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace CodeCloud\Bundle\ShopifyBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
class WebhookEvent extends Event
8
{
9
    const NAME = 'codecloud_shopify.webhook';
10
11
    /**
12
     * @var string
13
     */
14
    private $topic;
15
16
    /**
17
     * @var string
18
     */
19
    private $store;
20
21
    /**
22
     * @var array
23
     */
24
    private $resource;
25
26
    /**
27
     * @param string $topic
28
     * @param string $store
29
     * @param array $resource
30
     */
31
    public function __construct(string $topic, string $store, array $resource)
32
    {
33
        $this->topic = $topic;
34
        $this->store = $store;
35
        $this->resource = $resource;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getTopic(): string
42
    {
43
        return $this->topic;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getStore(): string
50
    {
51
        return $this->store;
52
    }
53
54
    /**
55
     * @return array
56
     */
57
    public function getResource(): array
58
    {
59
        return $this->resource;
60
    }
61
}
62