original_string: protected function onAttributeChange($name, $value = null)
      {
          if ('name' == $name) {
              if (null === $value) {
                  throw new HTML_QuickForm2_InvalidArgumentException(
                      "Required attribute 'name' can not be removed"
                  );
              } else {
                  $this->setName($value);
              }
          } elseif ('id' == $name) {
              if (null === $value) {
                  throw new HTML_QuickForm2_InvalidArgumentException(
                      "Required attribute 'id' can not be removed"
                  );
              } else {
                  $this->setId($value);
              }
          }
      }
code: protected function onAttributeChange($name, $value = null)
      {
          if ('name' == $name) {
              if (null === $value) {
                  throw new HTML_QuickForm2_InvalidArgumentException(
                      "Required attribute 'name' can not be removed"
                  );
              } else {
                  $this->setName($value);
              }
          } elseif ('id' == $name) {
              if (null === $value) {
                  throw new HTML_QuickForm2_InvalidArgumentException(
                      "Required attribute 'id' can not be removed"
                  );
              } else {
                  $this->setId($value);
              }
          }
      }
code_tokens: protected function onAttributeChange ( $ name , $ value = null ) { if ( 'name' == $ name ) { if ( null === $ value ) { throw new HTML_QuickForm2_InvalidArgumentException ( "Required attribute 'name' can not be removed" ) ; } else { $ this -> setName ( $ value ) ; } } elseif ( 'id' == $ name ) { if ( null === $ value ) { throw new HTML_QuickForm2_InvalidArgumentException ( "Required attribute 'id' can not be removed" ) ; } else { $ this -> setId ( $ value ) ; } } }
docstring: Intercepts setting 'name' and 'id' attributes
  
  These attributes should always be present and thus trying to remove them
  will result in an exception. Changing their values is delegated to
  setName() and setId() methods, respectively
  
  @param    string  Attribute name
  @param    string  Attribute value, null if attribute is being removed
  @throws   HTML_QuickForm2_InvalidArgumentException    if trying to
  remove a required attribute
docstring_tokens: Intercepts setting name and id attributes