original_string: protected function onAfterWrite() {
          parent::onAfterWrite();
          
          //Write the snippet version record
          if(!empty($this->Text)) {
              $version=new SnippetVersion();
              $version->Text=$this->Text;
              $version->ParentID=$this->ID;
              $version->write();
          }
      }
code: protected function onAfterWrite() {
          parent::onAfterWrite();
          
          //Write the snippet version record
          if(!empty($this->Text)) {
              $version=new SnippetVersion();
              $version->Text=$this->Text;
              $version->ParentID=$this->ID;
              $version->write();
          }
      }
code_tokens: protected function onAfterWrite ( ) { parent :: onAfterWrite ( ) ; //Write the snippet version record if ( ! empty ( $ this -> Text ) ) { $ version = new SnippetVersion ( ) ; $ version -> Text = $ this -> Text ; $ version -> ParentID = $ this -> ID ; $ version -> write ( ) ; } }
docstring: Creates the snippet version record after writing
docstring_tokens: Creates the snippet version record after writing