original_string: protected function _putData($key, $data)
      {
          $bool = $this->_validateDataKey($key, $data);
          if (!$bool) {
              return $this;
          }
  
          $hasData = $this->has($key);
          if ($this->_setPreparationOn) {
              $data = $this->_dataPreparation(
                  $key,
                  $data,
                  $this->_dataPreparationCallbacks
              );
          }
  
          if (!$hasData
              || ($hasData && $this->_comparator($this->_DATA[$key], $data, '!=='))
          ) {
              $this->_changeData($key, $data, $hasData);
          }
  
          return $this;
      }
code: protected function _putData($key, $data)
      {
          $bool = $this->_validateDataKey($key, $data);
          if (!$bool) {
              return $this;
          }
  
          $hasData = $this->has($key);
          if ($this->_setPreparationOn) {
              $data = $this->_dataPreparation(
                  $key,
                  $data,
                  $this->_dataPreparationCallbacks
              );
          }
  
          if (!$hasData
              || ($hasData && $this->_comparator($this->_DATA[$key], $data, '!=='))
          ) {
              $this->_changeData($key, $data, $hasData);
          }
  
          return $this;
      }
code_tokens: protected function _putData ( $ key , $ data ) { $ bool = $ this -> _validateDataKey ( $ key , $ data ) ; if ( ! $ bool ) { return $ this ; } $ hasData = $ this -> has ( $ key ) ; if ( $ this -> _setPreparationOn ) { $ data = $ this -> _dataPreparation ( $ key , $ data , $ this -> _dataPreparationCallbacks ) ; } if ( ! $ hasData || ( $ hasData && $ this -> _comparator ( $ this -> _DATA [ $ key ] , $ data , '!==' ) ) ) { $ this -> _changeData ( $ key , $ data , $ hasData ) ; } return $ this ; }
docstring: check that given data for key is valid and set in object if don't exist or is different
  
  @param string $key
  @param mixed $data
  @return $this
docstring_tokens: check that given data for key is valid and set in object if don t exist or is different