protected function normalizePrecision($precision)
    {
        $precisionFiltered = filter_var($precision, FILTER_SANITIZE_NUMBER_INT);

        return (int) min(10, max(0, $precisionFiltered));
    }
protected function normalizePrecision($precision)
    {
        $precisionFiltered = filter_var($precision, FILTER_SANITIZE_NUMBER_INT);

        return (int) min(10, max(0, $precisionFiltered));
    }
protected function normalizePrecision ( $ precision ) { $ precisionFiltered = filter_var ( $ precision , FILTER_SANITIZE_NUMBER_INT ) ; return ( int ) min ( 10 , max ( 0 , $ precisionFiltered ) ) ; }
Normalize precision value

The resulting value is an integer value between 0 and 10.

@uses \filter_var()

@param  integer $precision The precision value.
@return integer Returns the normalized value.
Normalize precision value