| Total Complexity | 6 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | trait ManageBillingCycle |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param int $every |
||
| 17 | * @return self |
||
| 18 | */ |
||
| 19 | public function daily($every = 1) |
||
| 20 | { |
||
| 21 | return $this->billEvery($every, BillingPeriod::DAILY); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param int $every |
||
| 26 | * @return self |
||
| 27 | */ |
||
| 28 | public function weekly($every = 1) |
||
| 29 | { |
||
| 30 | return $this->billEvery($every, BillingPeriod::WEEKLY); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param int $every |
||
| 35 | * @return self |
||
| 36 | */ |
||
| 37 | public function monthly($every = 1) |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param int $every |
||
| 44 | * @return self |
||
| 45 | */ |
||
| 46 | public function yearly($every = 1) |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param int $interval |
||
| 54 | * @param string $period |
||
| 55 | * @return $this |
||
| 56 | */ |
||
| 57 | public function billEvery(int $interval, string $period) |
||
| 65 | } |
||
| 66 | } |