original_string: public function restore($key = null)
      {
          if (is_null($key)) {
              $mergedData         = array_merge($this->_DATA, $this->_originalDATA);
              $this->_DATA        = $this->_removeNewKeys($mergedData);
              $this->_dataChanged = false;
              $this->_newKeys     = [];
          } else {
              if (array_key_exists($key, $this->_originalDATA)) {
                  $this->_DATA[$key] = $this->_originalDATA[$key];
              }
          }
  
          return $this;
      }
code: public function restore($key = null)
      {
          if (is_null($key)) {
              $mergedData         = array_merge($this->_DATA, $this->_originalDATA);
              $this->_DATA        = $this->_removeNewKeys($mergedData);
              $this->_dataChanged = false;
              $this->_newKeys     = [];
          } else {
              if (array_key_exists($key, $this->_originalDATA)) {
                  $this->_DATA[$key] = $this->_originalDATA[$key];
              }
          }
  
          return $this;
      }
code_tokens: public function restore ( $ key = null ) { if ( is_null ( $ key ) ) { $ mergedData = array_merge ( $ this -> _DATA , $ this -> _originalDATA ) ; $ this -> _DATA = $ this -> _removeNewKeys ( $ mergedData ) ; $ this -> _dataChanged = false ; $ this -> _newKeys = [ ] ; } else { if ( array_key_exists ( $ key , $ this -> _originalDATA ) ) { $ this -> _DATA [ $ key ] = $ this -> _originalDATA [ $ key ] ; } } return $ this ; }
docstring: replace changed data by original data
  set data changed to false only if restore whole data
  
  @param string|null $key
  @return $this
docstring_tokens: replace changed data by original data set data changed to false only if restore whole data