Completed
Pull Request — master (#351)
by Leny
06:37
created

WidgetFormCreateEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Victoire\Bundle\WidgetBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Victoire\Bundle\WidgetBundle\Form\WidgetOptionsContainer;
7
8
class WidgetFormCreateEvent extends Event
9
{
10
    /**
11
     * @var array
12
     */
13
    public $optionsContainer;
14
    /**
15
     * @var string
16
     */
17
    public $widgetFormTypeClass;
18
19
    /**
20
     * WidgetFormBuildEvent constructor.
21
     *
22
     * @param WidgetOptionsContainer $optionsContainer
23
     * @param string                 $widgetFormTypeClass
24
     */
25
    public function __construct(WidgetOptionsContainer $optionsContainer, $widgetFormTypeClass)
26
    {
27
        $this->optionsContainer = $optionsContainer;
0 ignored issues
show
Documentation Bug introduced by
It seems like $optionsContainer of type object<Victoire\Bundle\W...WidgetOptionsContainer> is incompatible with the declared type array of property $optionsContainer.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
28
        $this->widgetFormTypeClass = $widgetFormTypeClass;
29
    }
30
}
31