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

GrowingDiscount::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 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