Completed
Push — master ( e8bfce...313e31 )
by Arnaud
13s queued 11s
created

MenuEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 26
ccs 0
cts 12
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getMenu() 0 3 1
A getName() 0 3 1
1
<?php
2
3
namespace LAG\AdminBundle\Event\Menu;
4
5
use LAG\AdminBundle\Menu\Menu;
6
use Symfony\Component\EventDispatcher\Event;
7
8
class MenuEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

8
class MenuEvent extends /** @scrutinizer ignore-deprecated */ Event
Loading history...
9
{
10
    /**
11
     * @var string
12
     */
13
    private $name;
14
15
    /**
16
     * @var Menu
17
     */
18
    private $menu;
19
20
    public function __construct(string $name, Menu $menu)
21
    {
22
        $this->name = $name;
23
        $this->menu = $menu;
24
    }
25
26
    public function getName(): string
27
    {
28
        return $this->name;
29
    }
30
31
    public function getMenu(): Menu
32
    {
33
        return $this->menu;
34
    }
35
}
36