Details::getCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
namespace PHPSC\PagSeguro\Purchases;
3
4
use DateTime;
5
use PHPSC\PagSeguro\Customer\Customer;
6
7
/**
8
 * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
9
 */
10
class Details
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $code;
16
17
    /**
18
     * @var string
19
     */
20
    protected $reference;
21
22
    /**
23
     * @var mixed
24
     */
25
    protected $status;
26
27
    /**
28
     * @var DateTime
29
     */
30
    protected $date;
31
32
    /**
33
     * @var DateTime
34
     */
35
    protected $lastEventDate;
36
37
    /**
38
     * @var Customer
39
     */
40
    protected $customer;
41
42
    /**
43
     * @param string $code
44
     * @param string $reference
45
     * @param int $status
46
     * @param DateTime $date
47
     * @param DateTime $lastEventDate
48
     * @param Customer $customer
49
     */
50 19
    public function __construct(
51
        $code,
52
        $reference,
53
        $status,
54
        DateTime $date,
55
        DateTime $lastEventDate,
56
        Customer $customer
57
    ) {
58 19
        $this->code = $code;
59 19
        $this->reference = $reference;
60 19
        $this->status = $status;
61 19
        $this->date = $date;
62 19
        $this->lastEventDate = $lastEventDate;
63 19
        $this->customer = $customer;
64 19
    }
65
66
    /**
67
     * @return string
68
     */
69 1
    public function getCode()
70
    {
71 1
        return $this->code;
72
    }
73
74
    /**
75
     * @return string
76
     */
77 1
    public function getReference()
78
    {
79 1
        return $this->reference;
80
    }
81
82
    /**
83
     * @return mixed
84
     */
85 9
    public function getStatus()
86
    {
87 9
        return $this->status;
88
    }
89
90
    /**
91
     * @return DateTime
92
     */
93 1
    public function getDate()
94
    {
95 1
        return $this->date;
96
    }
97
98
    /**
99
     * @return DateTime
100
     */
101 1
    public function getLastEventDate()
102
    {
103 1
        return $this->lastEventDate;
104
    }
105
106
    /**
107
     * @return Customer
108
     */
109 1
    public function getCustomer()
110
    {
111 1
        return $this->customer;
112
    }
113
}
114