Completed
Push — master ( 1dbefb...c77374 )
by Jeroen
32s queued 11s
created

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

Severity

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
use Kunstmaan\NodeBundle\Entity\HasNodeInterface;
6
use Kunstmaan\NodeBundle\Entity\Node;
7
use Kunstmaan\NodeBundle\Entity\NodeTranslation;
8
use Kunstmaan\NodeBundle\Entity\NodeVersion;
9
use Symfony\Component\EventDispatcher\Event;
10
use Symfony\Component\HttpFoundation\Response;
11
12
/**
13
 * NodeEvent
14
 */
15
class NodeEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
16
{
17
    /**
18
     * @var HasNodeInterface
19
     */
20
    protected $page;
21
22
    /**
23
     * @var Node
24
     */
25
    protected $node;
26
27
    /**
28
     * @var NodeVersion
29
     */
30
    protected $nodeVersion;
31
32
    /**
33
     * @var NodeTranslation
34
     */
35
    protected $nodeTranslation;
36
37
    /**
38
     * @var Response
39
     */
40
    private $response;
41
42
    /**
43
     * @param Node             $node            The node
44
     * @param NodeTranslation  $nodeTranslation The nodetranslation
45
     * @param NodeVersion      $nodeVersion     The node version
46
     * @param HasNodeInterface $page            The object
47
     */
48 10
    public function __construct(Node $node, NodeTranslation $nodeTranslation, NodeVersion $nodeVersion, HasNodeInterface $page)
49
    {
50 10
        $this->node = $node;
51 10
        $this->nodeTranslation = $nodeTranslation;
52 10
        $this->nodeVersion = $nodeVersion;
53 10
        $this->page = $page;
54 10
    }
55
56
    /**
57
     * @return NodeVersion
58
     */
59 2
    public function getNodeVersion()
60
    {
61 2
        return $this->nodeVersion;
62
    }
63
64
    /**
65
     * @param NodeVersion $nodeVersion
66
     *
67
     * @return NodeEvent
68
     */
69 2
    public function setNodeVersion($nodeVersion)
70
    {
71 2
        $this->nodeVersion = $nodeVersion;
72
73 2
        return $this;
74
    }
75
76
    /**
77
     * @return Node
78
     */
79 2
    public function getNode()
80
    {
81 2
        return $this->node;
82
    }
83
84
    /**
85
     * @param Node $node
86
     *
87
     * @return NodeEvent
88
     */
89 2
    public function setNode($node)
90
    {
91 2
        $this->node = $node;
92
93 2
        return $this;
94
    }
95
96
    /**
97
     * @return NodeTranslation
98
     */
99 2
    public function getNodeTranslation()
100
    {
101 2
        return $this->nodeTranslation;
102
    }
103
104
    /**
105
     * @param NodeTranslation $nodeTranslation
106
     *
107
     * @return NodeEvent
108
     */
109 2
    public function setNodeTranslation($nodeTranslation)
110
    {
111 2
        $this->nodeTranslation = $nodeTranslation;
112
113 2
        return $this;
114
    }
115
116
    /**
117
     * @return HasNodeInterface
118
     */
119 2
    public function getPage()
120
    {
121 2
        return $this->page;
122
    }
123
124
    /**
125
     * @param HasNodeInterface $page
126
     *
127
     * @return NodeEvent
128
     */
129 2
    public function setPage($page)
130
    {
131 2
        $this->page = $page;
132
133 2
        return $this;
134
    }
135
136
    /**
137
     * @return Response|null
138
     */
139 2
    public function getResponse()
140
    {
141 2
        return $this->response;
142
    }
143
144
    /**
145
     * @param Response $response
146
     *
147
     * @return NodeEvent
148
     */
149 2
    public function setResponse(Response $response)
150
    {
151 2
        $this->response = $response;
152
153 2
        return $this;
154
    }
155
}
156