<?php
namespace WHMCS\Module\Addon\ProxyCheap;

class BillingCyclesHelper
{

    public static function getMonthsByCycle(string $billingcycle): ?int
    {
        $cycles = ["one time" => 1, "monthly" => 1, "quarterly" => 3, "semiannually"=>6, "annually"=>12, "biennially"=>24, "triennially"=>36];
        $billingcycle = strtolower($billingcycle);
        
        if($cycles[$billingcycle])
        {
            return $cycles[$billingcycle];
        }
        return false;
    }
}