ConfigureMenuEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 33
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getFactory() 0 4 1
A getMenu() 0 4 1
1
<?php
2
3
namespace Vivait\BootstrapBundle\Event;
4
5
use Knp\Menu\FactoryInterface;
6
use Knp\Menu\ItemInterface;
7
use Symfony\Component\EventDispatcher\Event;
8
9
class ConfigureMenuEvent extends Event
10
{
11
	const CONFIGURE = 'vivait.bootstrap.menu_configure';
12
13
	private $factory;
14
	private $menu;
15
16
	/**
17
	 * @param \Knp\Menu\FactoryInterface $factory
18
	 * @param \Knp\Menu\ItemInterface $menu
19
	 */
20
	public function __construct(FactoryInterface $factory, ItemInterface $menu)
21
	{
22
		$this->factory = $factory;
23
		$this->menu = $menu;
24
	}
25
26
	/**
27
	 * @return \Knp\Menu\FactoryInterface
28
	 */
29
	public function getFactory()
30
	{
31
		return $this->factory;
32
	}
33
34
	/**
35
	 * @return \Knp\Menu\ItemInterface
36
	 */
37
	public function getMenu()
38
	{
39
		return $this->menu;
40
	}
41
}