ResponseEvent   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 100
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 90%

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 1
dl 0
loc 100
rs 10
c 0
b 0
f 0
ccs 18
cts 20
cp 0.9

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 1
A getId() 0 4 1
A getResource() 0 4 1
A getRequestContent() 0 4 1
A getResponseContent() 0 4 1
A getRequestHeaders() 0 4 1
A getResponseHeaders() 0 4 1
1
<?php
2
3
namespace Freshcells\SoapClientBundle\Event;
4
5
/**
6
 * Class ResponseEvent
7
 */
8
class ResponseEvent extends Event
9
{
10
    /**
11
     * @var string
12
     */
13
    private $id;
14
    /**
15
     * @var string
16
     */
17
    private $resource;
18
    /**
19
     * @var
20
     */
21
    private $requestContent;
22
    /**
23
     * @var
24
     */
25
    private $requestHeaders;
26
    /**
27
     * @var
28
     */
29
    private $responseContent;
30
    /**
31
     * @var
32
     */
33
    private $responseHeaders;
34
35
    /**
36
     * ResponseEvent constructor.
37
     * @param string $id
38
     * @param string $resource
39
     * @param string|null $requestContent
40
     * @param string|null $requestHeaders
41
     * @param string|null $responseContent
42
     * @param string|null $responseHeaders
43
     */
44 12
    public function __construct(
45
        string $id,
46
        string $resource,
47
        ?string $requestContent = null,
48
        ?string $requestHeaders = null,
49
        ?string $responseContent = null,
50
        ?string $responseHeaders = null
51
    ) {
52 12
        $this->id              = $id;
53 12
        $this->resource        = $resource;
54 12
        $this->requestContent  = $requestContent;
55 12
        $this->requestHeaders  = $requestHeaders;
56 12
        $this->responseContent = $responseContent;
57 12
        $this->responseHeaders = $responseHeaders;
58 12
    }
59
60
    /**
61
     * @return string
62
     */
63 12
    public function getId(): string
64
    {
65 12
        return $this->id;
66
    }
67
68
    /**
69
     * @return string
70
     */
71
    public function getResource(): string
72
    {
73
        return $this->resource;
74
    }
75
76
    /**
77
     * @return string
78
     */
79 12
    public function getRequestContent(): ?string
80
    {
81 12
        return $this->requestContent;
82
    }
83
84
    /**
85
     * @return string
86
     */
87 12
    public function getResponseContent(): ?string
88
    {
89 12
        return $this->responseContent;
90
    }
91
92
    /**
93
     * @return string
94
     */
95 12
    public function getRequestHeaders(): ?string
96
    {
97 12
        return $this->requestHeaders;
98
    }
99
100
    /**
101
     * @return string
102
     */
103 12
    public function getResponseHeaders(): ?string
104
    {
105 12
        return $this->responseHeaders;
106
    }
107
}
108