Completed
Pull Request — master (#351)
by Leny
11:11 queued 05:05
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 Victoire\Bundle\WidgetBundle\Form\WidgetOptionsContainer;
6
7
class WidgetFormCreateEvent
8
{
9
    /**
10
     * @var array
11
     */
12
    public $optionsContainer;
13
    /**
14
     * @var string
15
     */
16
    public $widgetFormTypeClass;
17
18
    /**
19
     * WidgetFormBuildEvent constructor.
20
     *
21
     * @param WidgetOptionsContainer $optionsContainer
22
     * @param string                 $widgetFormTypeClass
23
     */
24
    public function __construct(WidgetOptionsContainer $optionsContainer, $widgetFormTypeClass)
25
    {
26
        $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...
27
        $this->widgetFormTypeClass = $widgetFormTypeClass;
28
    }
29
}
30