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

WidgetFormCreateEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace Victoire\Bundle\WidgetBundle\Event;
4
5
6
7
use Victoire\Bundle\WidgetBundle\Form\WidgetOptionsContainer;
8
9
class WidgetFormCreateEvent
10
{
11
    /**
12
     * @var array
13
     */
14
    public $optionsContainer;
15
    /**
16
     * @var string
17
     */
18
    public $widgetFormTypeClass;
19
20
    /**
21
     * WidgetFormBuildEvent constructor.
22
     *
23
     * @param WidgetOptionsContainer $optionsContainer
24
     * @param string          $widgetFormTypeClass
25
     */
26
    public function __construct(WidgetOptionsContainer $optionsContainer, $widgetFormTypeClass)
27
    {
28
29
        $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...
30
        $this->widgetFormTypeClass = $widgetFormTypeClass;
31
    }
32
}