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

Discount   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 77
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getPercentage() 0 4 1
A setPercentage() 0 6 1
A getAmount() 0 4 1
A setAmount() 0 6 1
A getMinimumPurchaseAmount() 0 4 1
A setMinimumPurchaseAmount() 0 6 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