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

FormSuccessEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFormResource() 0 3 1
A __construct() 0 4 1
A getForm() 0 3 1
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