@@ -9,7 +9,7 @@ |
||
9 | 9 | const COMMA = self::SPACES . ',' . self::SPACES; |
10 | 10 | const PIPE = self::SPACES . '\|' . self::SPACES; |
11 | 11 | const NUMBER = '(-?\d*\.?\d+)'; |
12 | - const NUMBER_OR_PERCENT = '('. self::NUMBER . '%?)'; //'((-?\d*\.?\d+)%?)'; |
|
12 | + const NUMBER_OR_PERCENT = '(' . self::NUMBER . '%?)'; //'((-?\d*\.?\d+)%?)'; |
|
13 | 13 | const PERCENT = self::NUMBER . '%'; |
14 | 14 | const POSITIVE_NUMBER = '(\d*\.?\d+)'; |
15 | 15 | const POSITIVE_NUMBER_OR_ASTERISK = '(\d*\.?\d+|\*)'; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | final class SegmentBillInterpreter extends AbstractBillInterpreter |
17 | 17 | { |
18 | - const EXP_SINGLE_SEGMENT = Expr::NUMBER_OR_PERCENT . |
|
18 | + const EXP_SINGLE_SEGMENT = Expr::NUMBER_OR_PERCENT . |
|
19 | 19 | ',' . |
20 | 20 | Expr::SPACES . |
21 | 21 | Expr::POSITIVE_NUMBER . |
@@ -36,12 +36,12 @@ |
||
36 | 36 | |
37 | 37 | if ($amount === '*') { |
38 | 38 | $percentageCtxt->setAmount(floatval($billableAmount)) |
39 | - ->setStructure($matches[1]); |
|
39 | + ->setStructure($matches[1]); |
|
40 | 40 | $bill += $percentageBillInterpreter->interpret($percentageCtxt); |
41 | 41 | } else { |
42 | 42 | $billableAmount -= $amount; |
43 | 43 | $percentageCtxt->setAmount($amount) |
44 | - ->setStructure($matches[1]); |
|
44 | + ->setStructure($matches[1]); |
|
45 | 45 | $bill += $percentageBillInterpreter->interpret($percentageCtxt); |
46 | 46 | } |
47 | 47 | } |