private static function normalizeValue($value)
    {
        if (is_string($value)) {
            $value = str_ireplace(['&nbsp;', '&#160;'], ' ', $value);
            $value = trim($value);

            return ($value === '') ? null : $value;
        }

        return $value;
    }
private static function normalizeValue($value)
    {
        if (is_string($value)) {
            $value = str_ireplace(['&nbsp;', '&#160;'], ' ', $value);
            $value = trim($value);

            return ($value === '') ? null : $value;
        }

        return $value;
    }
private static function normalizeValue ( $ value ) { if ( is_string ( $ value ) ) { $ value = str_ireplace ( [ '&nbsp;' , '&#160;' ] , ' ' , $ value ) ; $ value = trim ( $ value ) ; return ( $ value === '' ) ? null : $ value ; } return $ value ; }
Normalize a value.
If it's a string, removes spaces and normalize some utf-8 chars.

@param mixed $value

@return mixed
Normalize a value . If it s a string removes spaces and normalize some utf - 8 chars .