Completed
Push — master ( efd5b5...1cc014 )
by Andrii
02:16
created

GrowingDiscount   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 19
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * PHP Billing Library
4
 *
5
 * @link      https://github.com/hiqdev/php-billing
6
 * @package   php-billing
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017-2018, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\php\billing\charge\modifiers;
12
13
use hiqdev\php\billing\action\ActionInterface;
14
use hiqdev\php\billing\bill\BillInterface;
15
use hiqdev\php\billing\price\PriceInterface;
16
use hiqdev\php\units\QuantityInterface;
17
use Money\Money;
18
19
/**
20
 * Growing discount.
21
 *
22
 * @author Andrii Vasyliev <[email protected]>
23
 */
24
class GrowingDiscount extends Discount
25
{
26
    /**
27
     * @var int|Money
28
     */
29
    protected $step;
30
31
    /**
32 1
     * @var int|Money
33
     */
34 1
    protected $start;
35 1
36 1
    public function __construct($step, $start = null, array $addons = [])
37 1
    {
38
        parent::__construct($addons);
39
        $this->step = $step;
40
        $this->start = $start;
41
    }
42
}
43