original_string: public function destroy($id)
      {
          $model = $this->getModelName();
  
          $nodeType = $model::findOrFail($id);
  
          $this->builderService->destroyTable(
              $nodeType->getName(),
              $nodeType->getFieldKeys(),
              $nodeType->getKey()
          );
  
          $nodeType->delete();
  
          return $nodeType;
      }
code: public function destroy($id)
      {
          $model = $this->getModelName();
  
          $nodeType = $model::findOrFail($id);
  
          $this->builderService->destroyTable(
              $nodeType->getName(),
              $nodeType->getFieldKeys(),
              $nodeType->getKey()
          );
  
          $nodeType->delete();
  
          return $nodeType;
      }
code_tokens: public function destroy ( $ id ) { $ model = $ this -> getModelName ( ) ; $ nodeType = $ model :: findOrFail ( $ id ) ; $ this -> builderService -> destroyTable ( $ nodeType -> getName ( ) , $ nodeType -> getFieldKeys ( ) , $ nodeType -> getKey ( ) ) ; $ nodeType -> delete ( ) ; return $ nodeType ; }
docstring: Destroys a node type
  
  @param int $id
  @return NodeTypeContract
docstring_tokens: Destroys a node type