Completed
Push — master ( 47cba7...d961be )
by Jarek
14s
created

BatchEvent::getObject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * (c) FSi sp. z o.o. <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace FSi\Bundle\AdminBundle\Event;
11
12
use FSi\Bundle\AdminBundle\Admin\Element;
13
use Symfony\Component\EventDispatcher\Event;
14
use Symfony\Component\HttpFoundation\Request;
15
16
class BatchEvent extends Event
17
{
18
    /**
19
     * @var Element
20
     */
21
    private $element;
22
23
    /**
24
     * @var Request
25
     */
26
    private $request;
27
28
    /**
29
     * @var object
30
     */
31
    private $object;
32
33
    /**
34
     * @param Element $element
35
     * @param Request $request
36
     * @param object $object
37
     */
38
    public function __construct(Element $element, Request $request, $object)
0 ignored issues
show
Bug introduced by
You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
39
    {
40
        $this->element = $element;
41
        $this->request = $request;
42
        $this->object = $object;
43
    }
44
45
    /**
46
     * @return Element
47
     */
48
    public function getElement()
49
    {
50
        return $this->element;
51
    }
52
53
    /**
54
     * @return Request
55
     */
56
    public function getRequest()
57
    {
58
        return $this->request;
59
    }
60
61
    /**
62
     * @return object
63
     */
64
    public function getObject()
65
    {
66
        return $this->object;
67
    }
68
}
69