Completed
Push — master ( 91fdab...75a7b9 )
by
unknown
13:37
created

src/Kunstmaan/NodeBundle/Event/SlugEvent.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\NodeBundle\Event;
4
5
6
use Kunstmaan\NodeBundle\Helper\RenderContext;
7
use Symfony\Component\EventDispatcher\Event;
8
use Symfony\Component\HttpFoundation\Response;
9
10
/**
11
 * Class SlugEvent
12
 * @package Kunstmaan\NodeBundle\Event
13
 */
14
class SlugEvent extends Event
15
{
16
17
    /**
18
     * @var Response
19
     */
20
    protected $response;
21
22
    /**
23
     * @var RenderContext
24
     */
25
    protected $renderContext;
26
27
    /**
28
     * @param Response $response
0 ignored issues
show
Should the type for parameter $response not be null|Response?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
29
     * @param RenderContext $renderContext
30
     */
31
    public function __construct(Response $response = null, RenderContext $renderContext)
32
    {
33
        $this->response = $response;
34
        $this->renderContext = $renderContext;
35
    }
36
37
    /**
38
     * @return Response
39
     */
40
    public function getResponse()
41
    {
42
        return $this->response;
43
    }
44
45
    /**
46
     * @param Response $response
47
     */
48
    public function setResponse(Response $response)
49
    {
50
        $this->response = $response;
51
    }
52
53
    /**
54
     * @return RenderContext
55
     */
56
    public function getRenderContext()
57
    {
58
        return $this->renderContext;
59
    }
60
61
    /**
62
     * @param RenderContext $renderContext
63
     */
64
    public function setRenderContext(RenderContext $renderContext)
65
    {
66
        $this->renderContext = $renderContext;
67
    }
68
}
69