public static function formatToInteger($value, $decimals = 2)
    {
        if (trim($value) != null) {
            return number_format($value, $decimals, '.', '') * 100;
        }
        return null;
    }
public static function formatToInteger($value, $decimals = 2)
    {
        if (trim($value) != null) {
            return number_format($value, $decimals, '.', '') * 100;
        }
        return null;
    }
public static function formatToInteger ( $ value , $ decimals = 2 ) { if ( trim ( $ value ) != null ) { return number_format ( $ value , $ decimals , '.' , '' ) * 100 ; } return null ; }
Format the input data without decimal places

Defaults to no decimal places

@param     $value
@param int $decimals
@return null|string
Format the input data without decimal places