PostSubmitCartEvent::getCart()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GGGGino\SkuskuCartBundle\Event;
4
5
use Craue\FormFlowBundle\Event\FormFlowEvent;
6
use Craue\FormFlowBundle\Form\FormFlowInterface;
7
use GGGGino\SkuskuCartBundle\Model\SkuskuCart;
8
9
/**
10
 *  Event used *after* the procedure save the cart on the db
11
 *
12
 * Class PostSubmitCartEvent
13
 * @package GGGGino\SkuskuCartBundle\Event
14
 */
15
class PostSubmitCartEvent extends FormFlowEvent
16
{
17
    /**
18
     * @var SkuskuCart
19
     */
20
    private $cart;
21
22
    /**
23
     * @param FormFlowInterface $flow
24
     */
25
    public function __construct(FormFlowInterface $flow, SkuskuCart $cart)
26
    {
27
        parent::__construct($flow);
28
        $this->cart = $cart;
29
    }
30
31
    /**
32
     * @return SkuskuCart
33
     */
34
    public function getCart()
35
    {
36
        return $this->cart;
37
    }
38
}
39