original_string: private function createCsvFile($type, NodePath $nodePath, &$parentId)
      {
          if (empty($this->csvFiles[$type])) {
              $this->csvFiles[$type] = Table::create(
                  $type,
                  $this->getHeaders($nodePath, $parentId),
                  $this->temp
              );
              $this->csvFiles[$type]->addAttributes(["fullDisplayName" => $type]);
              if (!empty($this->primaryKeys[$type])) {
                  $this->csvFiles[$type]->setPrimaryKey($this->primaryKeys[$type]);
              }
          }
  
          return $this->csvFiles[$type];
      }
code: private function createCsvFile($type, NodePath $nodePath, &$parentId)
      {
          if (empty($this->csvFiles[$type])) {
              $this->csvFiles[$type] = Table::create(
                  $type,
                  $this->getHeaders($nodePath, $parentId),
                  $this->temp
              );
              $this->csvFiles[$type]->addAttributes(["fullDisplayName" => $type]);
              if (!empty($this->primaryKeys[$type])) {
                  $this->csvFiles[$type]->setPrimaryKey($this->primaryKeys[$type]);
              }
          }
  
          return $this->csvFiles[$type];
      }
code_tokens: private function createCsvFile ( $ type , NodePath $ nodePath , & $ parentId ) { if ( empty ( $ this -> csvFiles [ $ type ] ) ) { $ this -> csvFiles [ $ type ] = Table :: create ( $ type , $ this -> getHeaders ( $ nodePath , $ parentId ) , $ this -> temp ) ; $ this -> csvFiles [ $ type ] -> addAttributes ( [ "fullDisplayName" => $ type ] ) ; if ( ! empty ( $ this -> primaryKeys [ $ type ] ) ) { $ this -> csvFiles [ $ type ] -> setPrimaryKey ( $ this -> primaryKeys [ $ type ] ) ; } } return $ this -> csvFiles [ $ type ] ; }
docstring: to allow saving a single type to different files
  
  @param string $type
  @param NodePath $nodePath
  @param $parentId
  @return Table
docstring_tokens: to allow saving a single type to different files