Test Failed
Push — v2 ( 7912ef...ccc702 )
by Daniel
07:59
created

FormSuccessEvent::getFormResource()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/*
4
 * This file is part of the Silverback API Component Bundle Project
5
 *
6
 * (c) Daniel West <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Silverback\ApiComponentBundle\Event;
15
16
use Silverback\ApiComponentBundle\Entity\Component\Form;
17
use Symfony\Component\Form\FormInterface;
18
use Symfony\Contracts\EventDispatcher\Event;
19
20
/**
21
 * @author Daniel West <[email protected]>
22
 */
23
class FormSuccessEvent extends Event
24
{
25
    private Form $formResource;
26
    private FormInterface $form;
27
    public array $serializerContext = [];
28
29
    public function __construct(Form $formResource, FormInterface $form)
30
    {
31
        $this->formResource = $formResource;
32
        $this->form = $form;
33
    }
34
35
    public function getFormResource(): Form
36
    {
37
        return $this->formResource;
38
    }
39
40
    public function getForm(): FormInterface
41
    {
42
        return $this->form;
43
    }
44
}
45