original_string: public function createFactory($config)
      {
          $this->fileService->mkdir(dirname($config['_path_factory_']), 0777, true);
  
          if (!file_exists($config['_path_factory_'])) {
              $this->putIfNotExists($config['_path_factory_'], '<?php');
          }
  
          $factory = $this->fileService->get($config['template_source'].'/Factory.txt');
  
          $factory = $this->tableService->getTableSchema($config, $factory);
  
          foreach ($config as $key => $value) {
              $factory = str_replace($key, $value, $factory);
          }
  
          return $this->filesystem->append($config['_path_factory_'], $factory);
      }
code: public function createFactory($config)
      {
          $this->fileService->mkdir(dirname($config['_path_factory_']), 0777, true);
  
          if (!file_exists($config['_path_factory_'])) {
              $this->putIfNotExists($config['_path_factory_'], '<?php');
          }
  
          $factory = $this->fileService->get($config['template_source'].'/Factory.txt');
  
          $factory = $this->tableService->getTableSchema($config, $factory);
  
          foreach ($config as $key => $value) {
              $factory = str_replace($key, $value, $factory);
          }
  
          return $this->filesystem->append($config['_path_factory_'], $factory);
      }
code_tokens: public function createFactory ( $ config ) { $ this -> fileService -> mkdir ( dirname ( $ config [ '_path_factory_' ] ) , 0777 , true ) ; if ( ! file_exists ( $ config [ '_path_factory_' ] ) ) { $ this -> putIfNotExists ( $ config [ '_path_factory_' ] , '<?php' ) ; } $ factory = $ this -> fileService -> get ( $ config [ 'template_source' ] . '/Factory.txt' ) ; $ factory = $ this -> tableService -> getTableSchema ( $ config , $ factory ) ; foreach ( $ config as $ key => $ value ) { $ factory = str_replace ( $ key , $ value , $ factory ) ; } return $ this -> filesystem -> append ( $ config [ '_path_factory_' ] , $ factory ) ; }
docstring: Append to the factory.
  
  @param array $config
  
  @return bool
docstring_tokens: Append to the factory .