Skip to content

Commit

Permalink
deleted used function
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarai Misidjan authored and Sarai Misidjan committed Nov 9, 2023
1 parent 4cc5680 commit b21a6bb
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions src/Service/ImportResourcesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,41 +463,6 @@ public function importApplication(array $application, array $configuration): ?Ob
}//end importApplication()


/**
* @param array $component The component that is being imported
* @param array $configuration The configuration array
*
* @return ObjectEntity|null
*/
public function importComponent(array $component, array $configuration): ?ObjectEntity
{
// Do we have a source?
$source = $this->resourceService->getSource($configuration['githubSource'], 'open-catalogi/open-catalogi-bundle');
$componentSchema = $this->resourceService->getSchema($configuration['componentSchema'], 'open-catalogi/open-catalogi-bundle');
$componentMapping = $this->resourceService->getMapping($configuration['componentMapping'], 'open-catalogi/open-catalogi-bundle');

if ($source === null
|| $componentSchema === null
|| $componentMapping === null
) {
return null;
}

$synchronization = $this->syncService->findSyncBySource($source, $componentSchema, $component['id']);

$this->pluginLogger->debug('Mapping object'.$component['login'], ['plugin' => 'open-catalogi/open-catalogi-bundle']);
$this->pluginLogger->debug('The mapping object '.$componentMapping, ['plugin' => 'open-catalogi/open-catalogi-bundle']);

$this->pluginLogger->debug('Checking organisation '.$component['login'], ['plugin' => 'open-catalogi/open-catalogi-bundle']);
$synchronization->setMapping($componentMapping);
$synchronization = $this->syncService->synchronize($synchronization, $component);
$this->pluginLogger->debug('Organisation synchronization created with id: '.$synchronization->getId()->toString(), ['plugin' => 'open-catalogi/open-catalogi-bundle']);

return $synchronization->getObject();

}//end importComponent()


/**
* @param array $organisation The organization that is being imported
* @param array $configuration The configuration array
Expand Down

0 comments on commit b21a6bb

Please sign in to comment.