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

WidgetFormCreateEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 1 Features 1
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 23
rs 10
c 3
b 1
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
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