original_string: public function destroy($key = null)
      {
          if (is_null($key)) {
              $this->_dataChanged  = true;
              $mergedData          = array_merge($this->_DATA, $this->_originalDATA);
              $this->_originalDATA = $this->_removeNewKeys($mergedData);
              $this->_DATA         = [];
  
          } elseif (array_key_exists($key, $this->_DATA)) {
              $this->_dataChanged = true;
  
              if (!array_key_exists($key, $this->_originalDATA)
                  && !array_key_exists($key, $this->_newKeys)
              ) {
                  $this->_originalDATA[$key] = $this->_DATA[$key];
              }
  
              unset ($this->_DATA[$key]);
          }
  
          return $this;
      }
code: public function destroy($key = null)
      {
          if (is_null($key)) {
              $this->_dataChanged  = true;
              $mergedData          = array_merge($this->_DATA, $this->_originalDATA);
              $this->_originalDATA = $this->_removeNewKeys($mergedData);
              $this->_DATA         = [];
  
          } elseif (array_key_exists($key, $this->_DATA)) {
              $this->_dataChanged = true;
  
              if (!array_key_exists($key, $this->_originalDATA)
                  && !array_key_exists($key, $this->_newKeys)
              ) {
                  $this->_originalDATA[$key] = $this->_DATA[$key];
              }
  
              unset ($this->_DATA[$key]);
          }
  
          return $this;
      }
code_tokens: public function destroy ( $ key = null ) { if ( is_null ( $ key ) ) { $ this -> _dataChanged = true ; $ mergedData = array_merge ( $ this -> _DATA , $ this -> _originalDATA ) ; $ this -> _originalDATA = $ this -> _removeNewKeys ( $ mergedData ) ; $ this -> _DATA = [ ] ; } elseif ( array_key_exists ( $ key , $ this -> _DATA ) ) { $ this -> _dataChanged = true ; if ( ! array_key_exists ( $ key , $ this -> _originalDATA ) && ! array_key_exists ( $ key , $ this -> _newKeys ) ) { $ this -> _originalDATA [ $ key ] = $ this -> _DATA [ $ key ] ; } unset ( $ this -> _DATA [ $ key ] ) ; } return $ this ; }
docstring: destroy key entry in object data, or whole keys
  automatically set data to original array
  
  @param string|null $key
  @return $this
docstring_tokens: destroy key entry in object data or whole keys automatically set data to original array