protected function normalizeNumericValue($value)
    {
        if (empty($value)) {
            return 0;
        }
        if (is_string($value) && is_numeric($value)) {
            $value = (float) $value;
        }
        if (!is_numeric($value)) {
            throw new InvalidArgumentException("'$value' is not a numeric value.");
        }

        return $value;
    }
protected function normalizeNumericValue($value)
    {
        if (empty($value)) {
            return 0;
        }
        if (is_string($value) && is_numeric($value)) {
            $value = (float) $value;
        }
        if (!is_numeric($value)) {
            throw new InvalidArgumentException("'$value' is not a numeric value.");
        }

        return $value;
    }
protected function normalizeNumericValue ( $ value ) { if ( empty ( $ value ) ) { return 0 ; } if ( is_string ( $ value ) && is_numeric ( $ value ) ) { $ value = ( float ) $ value ; } if ( ! is_numeric ( $ value ) ) { throw new InvalidArgumentException ( "'$value' is not a numeric value." ) ; } return $ value ; }
Normalizes a numeric input value.

- everything [empty](https://secure.php.net/manual/en/function.empty.php) will result in `0`
- a [numeric](https://secure.php.net/manual/en/function.is-numeric.php) string will be casted to float
- everything else will be returned if it is [numeric](https://secure.php.net/manual/en/function.is-numeric.php),
otherwise an exception is thrown.

@param mixed $value the input value
@return float|int the normalized number value
@throws InvalidArgumentException if the input value is not numeric.
Normalizes a numeric input value .