TakeCustomerAccountEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCustomer() 0 4 1
A setCustomer() 0 5 1
1
<?php
2
/*************************************************************************************/
3
/*      This file is part of the module TakeCustomerAccount                          */
4
/*                                                                                   */
5
/*      Copyright (c) OpenStudio                                                     */
6
/*      email : [email protected]                                                       */
7
/*      web : http://www.thelia.net                                                  */
8
/*                                                                                   */
9
/*      For the full copyright and license information, please view the LICENSE.txt  */
10
/*      file that was distributed with this source code.                             */
11
/*************************************************************************************/
12
13
namespace TakeCustomerAccount\Event;
14
15
use Thelia\Core\Event\ActionEvent;
16
use Thelia\Model\Customer;
17
18
/**
19
 * Class TakeCustomerAccountEvent
20
 * @package TakeCustomerAccount\Event
21
 * @author Gilles Bourgeat <[email protected]>
22
 */
23
class TakeCustomerAccountEvent extends ActionEvent
24
{
25
    /** @var Customer */
26
    protected $customer;
27
28
    /**
29
     * @param Customer $customer
30
     */
31
    public function __construct(Customer $customer)
32
    {
33
        $this->customer = $customer;
34
    }
35
36
    /**
37
     * @return Customer
38
     */
39
    public function getCustomer()
40
    {
41
        return $this->customer;
42
    }
43
44
    /**
45
     * @param Customer $customer
46
     * @return TakeCustomerAccountEvent
47
     */
48
    public function setCustomer($customer)
49
    {
50
        $this->customer = $customer;
51
        return $this;
52
    }
53
}
54