Passed
Pull Request — master (#259)
by Arnaud
08:22
created

MenuEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
c 1
b 0
f 0
dl 0
loc 19
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getMenu() 0 3 1
A getMenuName() 0 3 1
1
<?php
2
3
namespace LAG\AdminBundle\Event\Events;
4
5
use Knp\Menu\ItemInterface;
6
use Symfony\Contracts\EventDispatcher\Event;
7
8
class MenuEvent extends Event
9
{
10
    private string $menuName;
11
    private ItemInterface $menu;
12
13
    public function __construct(string $menuName, ItemInterface $menu)
14
    {
15
        $this->menuName = $menuName;
16
        $this->menu = $menu;
17
    }
18
19
    public function getMenuName(): string
20
    {
21
        return $this->menuName;
22
    }
23
24
    public function getMenu(): ItemInterface
25
    {
26
        return $this->menu;
27
    }
28
}
29