original_string: public function setData(array $data, $replaceTemplateVariables = true) : self
      {
          $this->assertDataIsWritable();
  
          if ($replaceTemplateVariables) {
              $data = $this->replaceTemplateVariables($data);
          }
  
          $this->_data = $data;
  
          return $this;
      }
code: public function setData(array $data, $replaceTemplateVariables = true) : self
      {
          $this->assertDataIsWritable();
  
          if ($replaceTemplateVariables) {
              $data = $this->replaceTemplateVariables($data);
          }
  
          $this->_data = $data;
  
          return $this;
      }
code_tokens: public function setData ( array $ data , $ replaceTemplateVariables = true ) : self { $ this -> assertDataIsWritable ( ) ; if ( $ replaceTemplateVariables ) { $ data = $ this -> replaceTemplateVariables ( $ data ) ; } $ this -> _data = $ data ; return $ this ; }
docstring: Setter method for field data.
  
  @param array $data                     - data.
  @param bool  $replaceTemplateVariables - Replace template variables?
  
  @throws DataIsReadOnlyException - If data is on read-only status.
  
  @return $this
docstring_tokens: Setter method for field data .