original_string: protected function _genericDestroy($key, $type)
      {
          $listName = $this->_getCorrectList($type);
  
          if ($key) {
              $list = &$this->$listName;
              unset ($list[$key]);
          }
          $this->$listName = [];
  
          return $this;
      }
code: protected function _genericDestroy($key, $type)
      {
          $listName = $this->_getCorrectList($type);
  
          if ($key) {
              $list = &$this->$listName;
              unset ($list[$key]);
          }
          $this->$listName = [];
  
          return $this;
      }
code_tokens: protected function _genericDestroy ( $ key , $ type ) { $ listName = $ this -> _getCorrectList ( $ type ) ; if ( $ key ) { $ list = & $ this -> $ listName ; unset ( $ list [ $ key ] ) ; } $ this -> $ listName = [ ] ; return $ this ; }
docstring: common destroy data method for class data lists
  
  @param string $key
  @param string $type
  @return $this
docstring_tokens: common destroy data method for class data lists