Passed
Push — master ( 75519a...9d574c )
by Michael
04:26
created

ResponseEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 39
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setResponse() 0 4 1
A getResponse() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Mikemirten\Component\JsonApi\HttpClient\Decorator\SymfonyEvent;
5
6
use Psr\Http\Message\ResponseInterface;
7
use Symfony\Component\EventDispatcher\Event;
8
9
class ResponseEvent extends Event
10
{
11
    /**
12
     * Response
13
     *
14
     * @var ResponseInterface
15
     */
16
    protected $response;
17
18
    /**
19
     * ResponseEvent constructor.
20
     *
21
     * @param ResponseInterface $response
22
     */
23 3
    public function __construct(ResponseInterface $response)
24
    {
25 3
        $this->response = $response;
26 3
    }
27
28
    /**
29
     * Set response
30
     *
31
     * @param ResponseInterface $response
32
     */
33 1
    public function setResponse(ResponseInterface $response)
34
    {
35 1
        $this->response = $response;
36 1
    }
37
38
    /**
39
     * Get response
40
     *
41
     * @return ResponseInterface
42
     */
43 3
    public function getResponse(): ResponseInterface
44
    {
45 3
        return $this->response;
46
    }
47
}