Completed
Push — master ( c7b78a...21ab66 )
by Jacques
15s queued 12s
created

RenderUiElementEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 8
c 1
b 0
f 0
dl 0
loc 34
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setElement() 0 3 1
A getUiElement() 0 3 1
A __construct() 0 6 1
A getElement() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MonsieurBiz\SyliusRichEditorPlugin\Event;
6
7
use MonsieurBiz\SyliusRichEditorPlugin\UiElement\UiElementInterface;
8
use Symfony\Contracts\EventDispatcher\Event;
9
10
class RenderUiElementEvent extends Event
11
{
12
    /**
13
     * @var array
14
     */
15
    protected $element;
16
17
    /**
18
     * @var UiElementInterface
19
     */
20
    protected $uiElement;
21
22
    public function __construct(
23
        UiElementInterface $uiElement,
24
        array $element
25
    ) {
26
        $this->uiElement = $uiElement;
27
        $this->element = $element;
28
    }
29
30
    public function getUiElement(): UiElementInterface
31
    {
32
        return $this->uiElement;
33
    }
34
35
36
    public function getElement(): array
37
    {
38
        return $this->element;
39
    }
40
41
    public function setElement(array $element): void
42
    {
43
        $this->element = $element;
44
    }
45
}
46