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

OrderShowMenuBuilderEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getOrder() 0 4 1
A getStateMachine() 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 SM\StateMachine\StateMachineInterface;
17
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
18
use Sylius\Component\Core\Model\OrderInterface;
19
20
/**
21
 * @author Grzegorz Sadowski <[email protected]>
22
 */
23
class OrderShowMenuBuilderEvent extends MenuBuilderEvent
24
{
25
    /**
26
     * @var OrderInterface
27
     */
28
    private $order;
29
30
    /**
31
     * @var StateMachineInterface
32
     */
33
    private $stateMachine;
34
35
    /**
36
     * @param FactoryInterface $factory
37
     * @param ItemInterface $menu
38
     * @param OrderInterface $order
39
     * @param StateMachineInterface $stateMachine
40
     */
41
    public function __construct(
42
        FactoryInterface $factory,
43
        ItemInterface $menu,
44
        OrderInterface $order,
45
        StateMachineInterface $stateMachine
46
    ) {
47
        parent::__construct($factory, $menu);
48
49
        $this->order = $order;
50
        $this->stateMachine = $stateMachine;
51
    }
52
53
    /**
54
     * @return OrderInterface
55
     */
56
    public function getOrder()
57
    {
58
        return $this->order;
59
    }
60
61
    /**
62
     * @return StateMachineInterface
63
     */
64
    public function getStateMachine()
65
    {
66
        return $this->stateMachine;
67
    }
68
}
69