public static function percentage($number1 = false, $number2 = false, $decimals = 2) {

        if($number1 && $number2) {

            return self::round(($number1 / $number2) * 100, $decimals);
        }

        return false;
    }
public static function percentage($number1 = false, $number2 = false, $decimals = 2) {

        if($number1 && $number2) {

            return self::round(($number1 / $number2) * 100, $decimals);
        }

        return false;
    }
public static function percentage ( $ number1 = false , $ number2 = false , $ decimals = 2 ) { if ( $ number1 && $ number2 ) { return self :: round ( ( $ number1 / $ number2 ) * 100 , $ decimals ) ; } return false ; }
Get the percentage.
@param float number part
@param float number total
@param numbes of decimals
@return int || float
Get the percentage .