FormEvent::getForm()   A
last analyzed

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
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Ob\CmsBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Symfony\Component\Form\FormInterface;
7
8
class FormEvent extends Event
9
{
10
    /**
11
     * @var FormInterface
12
     */
13
    private $form;
14
15
    /**
16
     * @var mixed
17
     */
18
    private $entity;
19
20
    /**
21
     * @param FormInterface $form
22
     * @param mixed         $entity
23
     */
24
    public function __construct(FormInterface $form, $entity)
25
    {
26
        $this->form   = $form;
27
        $this->entity = $entity;
28
    }
29
30
    /**
31
     * @return FormInterface
32
     */
33
    public function getForm()
34
    {
35
        return $this->form;
36
    }
37
38
    /**
39
     * @return mixed
40
     */
41
    public function getEntity()
42
    {
43
        return $this->entity;
44
    }
45
}
46