Completed
Push — locale-in-url ( b918e2...821ef5 )
by Kamil
48:02 queued 26:12
created

CustomerShowMenuBuilderEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getCustomer() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Bundle\AdminBundle\Event;
13
14
use Knp\Menu\FactoryInterface;
15
use Knp\Menu\ItemInterface;
16
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
17
use Sylius\Component\Core\Model\CustomerInterface;
18
19
/**
20
 * @author Grzegorz Sadowski <[email protected]>
21
 */
22
class CustomerShowMenuBuilderEvent extends MenuBuilderEvent
23
{
24
    /**
25
     * @var CustomerInterface
26
     */
27
    private $customer;
28
29
    /**
30
     * @param FactoryInterface $factory
31
     * @param ItemInterface $menu
32
     * @param CustomerInterface $customer
33
     */
34
    public function __construct(FactoryInterface $factory, ItemInterface $menu, CustomerInterface $customer)
35
    {
36
        parent::__construct($factory, $menu);
37
38
        $this->customer = $customer;
39
    }
40
41
    /**
42
     * @return CustomerInterface
43
     */
44
    public function getCustomer()
45
    {
46
        return $this->customer;
47
    }
48
}
49