private static function toPlainValue($value)
    {
        if (is_string($value)) {
            $value = strip_tags($value);
            $value = html_entity_decode($value, ENT_QUOTES | ENT_XML1, 'UTF-8');
            $value = trim($value);

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

        return $value;
    }
private static function toPlainValue($value)
    {
        if (is_string($value)) {
            $value = strip_tags($value);
            $value = html_entity_decode($value, ENT_QUOTES | ENT_XML1, 'UTF-8');
            $value = trim($value);

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

        return $value;
    }
private static function toPlainValue ( $ value ) { if ( is_string ( $ value ) ) { $ value = strip_tags ( $ value ) ; $ value = html_entity_decode ( $ value , ENT_QUOTES | ENT_XML1 , 'UTF-8' ) ; $ value = trim ( $ value ) ; return ( $ value === '' ) ? null : $ value ; } return $ value ; }
Remove the html code and entities in a value

@param mixed $value

@return mixed
Remove the html code and entities in a value