Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
57 | public function billEvery(int $interval, string $period) |
||
58 | { |
||
59 | if (!in_array($period, BillingPeriod::PERIOD)) { |
||
60 | throw new Exception("Invalid period [{$interval}] in " . get_class($this)); |
||
61 | } |
||
62 | $this->subscription->billing_interval = $interval; |
||
63 | $this->subscription->billing_period = $period; |
||
64 | return $this; |
||
65 | } |
||
66 | } |