original_string: public function createService($config)
      {
          $this->fileService->mkdir($config['_path_service_'], 0777, true);
  
          $service = $this->fileService->get($config['template_source'].'/Service.txt');
  
          if ($config['options-withBaseService'] ?? false) {
              $baseService = $this->fileService->get($config['template_source'].'/BaseService.txt');
              $service = $this->fileService->get($config['template_source'].'/ExtendedService.txt');
          }
  
          foreach ($config as $key => $value) {
              $service = str_replace($key, $value, $service);
              if ($config['options-withBaseService'] ?? false) {
                  $baseService = str_replace($key, $value, $baseService);
              }
          }
  
          $service = $this->putIfNotExists($config['_path_service_'].'/'.$config['_camel_case_'].'Service.php', $service);
  
          if ($config['options-withBaseService'] ?? false) {
              $this->putIfNotExists($config['_path_service_'].'/BaseService.php', $baseService);
          }
  
          return $service;
      }
code: public function createService($config)
      {
          $this->fileService->mkdir($config['_path_service_'], 0777, true);
  
          $service = $this->fileService->get($config['template_source'].'/Service.txt');
  
          if ($config['options-withBaseService'] ?? false) {
              $baseService = $this->fileService->get($config['template_source'].'/BaseService.txt');
              $service = $this->fileService->get($config['template_source'].'/ExtendedService.txt');
          }
  
          foreach ($config as $key => $value) {
              $service = str_replace($key, $value, $service);
              if ($config['options-withBaseService'] ?? false) {
                  $baseService = str_replace($key, $value, $baseService);
              }
          }
  
          $service = $this->putIfNotExists($config['_path_service_'].'/'.$config['_camel_case_'].'Service.php', $service);
  
          if ($config['options-withBaseService'] ?? false) {
              $this->putIfNotExists($config['_path_service_'].'/BaseService.php', $baseService);
          }
  
          return $service;
      }
code_tokens: public function createService ( $ config ) { $ this -> fileService -> mkdir ( $ config [ '_path_service_' ] , 0777 , true ) ; $ service = $ this -> fileService -> get ( $ config [ 'template_source' ] . '/Service.txt' ) ; if ( $ config [ 'options-withBaseService' ] ?? false ) { $ baseService = $ this -> fileService -> get ( $ config [ 'template_source' ] . '/BaseService.txt' ) ; $ service = $ this -> fileService -> get ( $ config [ 'template_source' ] . '/ExtendedService.txt' ) ; } foreach ( $ config as $ key => $ value ) { $ service = str_replace ( $ key , $ value , $ service ) ; if ( $ config [ 'options-withBaseService' ] ?? false ) { $ baseService = str_replace ( $ key , $ value , $ baseService ) ; } } $ service = $ this -> putIfNotExists ( $ config [ '_path_service_' ] . '/' . $ config [ '_camel_case_' ] . 'Service.php' , $ service ) ; if ( $ config [ 'options-withBaseService' ] ?? false ) { $ this -> putIfNotExists ( $ config [ '_path_service_' ] . '/BaseService.php' , $ baseService ) ; } return $ service ; }
docstring: Create the service.
  
  @param array $config
  
  @return bool
docstring_tokens: Create the service .