PostSubmitCartEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCart() 0 3 1
A __construct() 0 4 1
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