Completed
Push — master ( 5a9118...b8f507 )
by Ronaldo
01:28
created

Discount::setMinimumPurchaseAmount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace WSW\SiftScience\Entities;
4
5
use WSW\Money\Money;
6
use WSW\Money\Percentage;
7
8
/**
9
 * Class Discount
10
 *
11
 * @package WSW\SiftScience\Entities
12
 * @author Ronaldo Matos Rodrigues <[email protected]>
13
 */
14
class Discount
15
{
16
    /**
17
     * @var Percentage
18
     */
19
    private $percentage;
20
21
    /**
22
     * @var Money
23
     */
24
    private $amount;
25
26
    /**
27
     * @var Money
28
     */
29
    private $minimumPurchaseAmount;
30
31
    /**
32
     * @return Percentage
33
     */
34 1
    public function getPercentage()
35
    {
36 1
        return $this->percentage;
37
    }
38
39
    /**
40
     * @param Percentage $percentage
41
     *
42
     * @return Discount
43
     */
44 1
    public function setPercentage(Percentage $percentage)
45
    {
46 1
        $this->percentage = $percentage;
47
48 1
        return $this;
49
    }
50
51
    /**
52
     * @return Money
53
     */
54 1
    public function getAmount()
55
    {
56 1
        return $this->amount;
57
    }
58
59
    /**
60
     * @param Money $amount
61
     *
62
     * @return Discount
63
     */
64 1
    public function setAmount(Money $amount)
65
    {
66 1
        $this->amount = $amount;
67
68 1
        return $this;
69
    }
70
71
    /**
72
     * @return Money
73
     */
74 1
    public function getMinimumPurchaseAmount()
75
    {
76 1
        return $this->minimumPurchaseAmount;
77
    }
78
79
    /**
80
     * @param Money $minimumPurchaseAmount
81
     *
82
     * @return Discount
83
     */
84 1
    public function setMinimumPurchaseAmount(Money $minimumPurchaseAmount)
85
    {
86 1
        $this->minimumPurchaseAmount = $minimumPurchaseAmount;
87
88 1
        return $this;
89
    }
90
}
91