private static function discardDecimalDigitsZero($amount, $minimumDecimalDigits = 0)
    {
        if (false !== strpos($amount, '.')) {
            while ('0' == substr($amount, -1)) {
                $amount = substr($amount, 0, -1);
            }

            if ('.' == substr($amount, -1)) {
                $amount = substr($amount, 0, -1);
            }
        }

        if ($minimumDecimalDigits > 0) {
            if (false === strpos($amount, '.')) {
                $amount .= '.';
            }

            $currentDecimalDigits = strlen(substr($amount, strpos($amount, '.') + 1));
            $minimumDecimalDigits -= $currentDecimalDigits;

            while ($minimumDecimalDigits > 0) {
                $amount .= '0';
                $minimumDecimalDigits--;
            }
        }

        return $amount;
    }