Total Complexity | 3 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | final class ProgressivePriceCalculationTrace implements Stringable |
||
17 | { |
||
18 | public function __construct( |
||
23 | } |
||
24 | |||
25 | public function __toString(): string |
||
26 | { |
||
27 | return sprintf( |
||
28 | "%s%s * %s = %s", |
||
29 | $this->billedUsage->getQuantity(), |
||
30 | $this->billedUsage->getUnit()->getName(), |
||
31 | $this->threshold->getRawPrice(), |
||
32 | number_format($this->charged->getAmount()/100, 2), |
||
33 | ); |
||
34 | } |
||
35 | |||
36 | public function toShortString(): string |
||
42 | ); |
||
43 | } |
||
45 |