@@ -16,8 +16,8 @@ |
||
16 | 16 | final class FlatRateBillInterpreter extends AbstractBillInterpreter |
17 | 17 | { |
18 | 18 | private const EXPRESSION = Expr::POSITIVE_NUMBER . |
19 | - Expr::COMMA . |
|
20 | - Expr::RANGE; |
|
19 | + Expr::COMMA . |
|
20 | + Expr::RANGE; |
|
21 | 21 | |
22 | 22 | public function __construct() |
23 | 23 | { |
@@ -10,8 +10,8 @@ |
||
10 | 10 | final class PercentageBillInterpreter extends AbstractBillInterpreter |
11 | 11 | { |
12 | 12 | private const EXPRESSION = Expr::PERCENT . |
13 | - Expr::COMMA . |
|
14 | - Expr::RANGE; |
|
13 | + Expr::COMMA . |
|
14 | + Expr::RANGE; |
|
15 | 15 | private $ranges = []; |
16 | 16 | |
17 | 17 | public function __construct() |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $amount = $context->getAmount(); |
44 | 44 | |
45 | 45 | if (RangeHelper::isInRange($range, $amount)) { |
46 | - $bill = ($matches[1] * $amount)/ 100.00; |
|
46 | + $bill = ($matches[1] * $amount) / 100.00; |
|
47 | 47 | break; |
48 | 48 | } |
49 | 49 | } |
@@ -37,12 +37,12 @@ |
||
37 | 37 | |
38 | 38 | if ($amount === '*') { |
39 | 39 | $percentageCtxt->setAmount(floatval($billableAmount)) |
40 | - ->setStructure($matches[1] . ', 1 - * '); |
|
40 | + ->setStructure($matches[1] . ', 1 - * '); |
|
41 | 41 | $bill += $percentageBillInterpreter->interpret($percentageCtxt); |
42 | 42 | } else { |
43 | 43 | $billableAmount -= $amount; |
44 | 44 | $percentageCtxt->setAmount($amount) |
45 | - ->setStructure($matches[1] . ', 1 - * '); |
|
45 | + ->setStructure($matches[1] . ', 1 - * '); |
|
46 | 46 | $bill += $percentageBillInterpreter->interpret($percentageCtxt); |
47 | 47 | } |
48 | 48 | } |