Completed
Push — master ( b8bed0...083509 )
by Eric
04:00 queued 01:09
created

ResponseEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 0 Features 1
Metric Value
wmc 3
c 4
b 0
f 1
lcom 0
cbo 1
dl 0
loc 31
rs 10
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Jarvis\Skill\EventBroadcaster;
6
7
use Symfony\Component\HttpFoundation\Request;
8
use Symfony\Component\HttpFoundation\Response;
9
10
/**
11
 * @author Eric Chau <[email protected]>
12
 */
13
class ResponseEvent extends SimpleEvent
14
{
15
    protected $request;
16
    protected $response;
17
18
    public function __construct(Request $request, Response $response)
19
    {
20
        $this->request = $request;
21
        $this->response = $response;
22
    }
23
24
    /**
25
     * @codeCoverageIgnore
26
     *
27
     * @return Request
28
     */
29
    public function request(): Request
30
    {
31
        return $this->request;
32
    }
33
34
    /**
35
     * @codeCoverageIgnore
36
     *
37
     * @return Response
38
     */
39
    public function response(): ?Response
1 ignored issue
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected '?'
Loading history...
40
    {
41
        return $this->response;
42
    }
43
}
44