Example #1
0
 /**
  * {@inheritdoc}
  */
 public function getMrrValue(BillingPeriodInterface $billing_period) : float
 {
     switch ($billing_period->getBillingPeriod()) {
         case BillingPeriodInterface::MONTHLY:
             return 25;
         case BillingPeriodInterface::YEARLY:
             return round(250 / 12, 3);
         default:
             throw new RuntimeException("Value '{$billing_period->getBillingPeriod()} is not a valid billing period for paid plans");
     }
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function getMrrValue(BillingPeriodInterface $billing_period) : float
 {
     if ($billing_period->getBillingPeriod() == BillingPeriodInterface::NONE) {
         return 0;
     } else {
     }
     switch ($billing_period->getBillingPeriod()) {
         case BillingPeriodInterface::MONTHLY:
             return 99;
         case BillingPeriodInterface::YEARLY:
             return 999;
         default:
             throw new RuntimeException("Value '{$billing_period->getBillingPeriod()} is not a valid billing period for free plans");
     }
 }