Completed
Pull Request — master (#351)
by Leny
11:11 queued 05:05
created

WidgetFormCreateEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

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