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

ResponseEvent::setResponse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 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
}