original_string: public function setValid($charset, $valid = true)
      {
          $charset = Horde_String::upper($charset);
          $valid = (bool)$valid;
  
          if (!isset($this->_charsets[$charset]) ||
              ($this->_charsets[$charset] !== $valid)) {
              $this->_charsets[$charset] = $valid;
              $this->notify();
          }
      }
code: public function setValid($charset, $valid = true)
      {
          $charset = Horde_String::upper($charset);
          $valid = (bool)$valid;
  
          if (!isset($this->_charsets[$charset]) ||
              ($this->_charsets[$charset] !== $valid)) {
              $this->_charsets[$charset] = $valid;
              $this->notify();
          }
      }
code_tokens: public function setValid ( $ charset , $ valid = true ) { $ charset = Horde_String :: upper ( $ charset ) ; $ valid = ( bool ) $ valid ; if ( ! isset ( $ this -> _charsets [ $ charset ] ) || ( $ this -> _charsets [ $ charset ] !== $ valid ) ) { $ this -> _charsets [ $ charset ] = $ valid ; $ this -> notify ( ) ; } }
docstring: Set the validity of a given charset.
  
  @param string $charset  The charset.
  @param boolean $valid   Is charset valid?
docstring_tokens: Set the validity of a given charset .