Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrands02 committed Oct 7, 2024
1 parent 8dd9a84 commit 992acae
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/Service/NotificationToTaakService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

namespace CommonGateway\XxllncToKTBBundle\Service;

use App\Service\SynchronizationService as OldSynchronizationService;
use CommonGateway\CoreBundle\Service\SynchronizationService;
use App\Service\SynchronizationService;
use CommonGateway\CoreBundle\Service\CallService;
use CommonGateway\CoreBundle\Service\MappingService;
use App\Service\GatewayResourceService as ResourceService;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Exception;

Expand All @@ -29,12 +26,9 @@ class NotificationToTaakService
* __construct.
*/
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly ResourceService $resourceService,
private readonly CallService $callService,
private readonly OldSynchronizationService $oldSynchronizationService,
private readonly SynchronizationService $synchronizationService,

Check warning on line 31 in src/Service/NotificationToTaakService.php

View workflow job for this annotation

GitHub Actions / build

Avoid excessively long variable names like $synchronizationService. Keep variable name length under 20.

Check warning on line 31 in src/Service/NotificationToTaakService.php

View workflow job for this annotation

GitHub Actions / build

Avoid excessively long variable names like $synchronizationService. Keep variable name length under 20.
private readonly MappingService $mappingService,
private readonly LoggerInterface $pluginLogger,
) {

Expand Down Expand Up @@ -92,10 +86,10 @@ private function synchronizeTask(array $configuration, array $data): array
}

// Find or create synchronization object.
$synchronization = $this->oldSynchronizationService->findSyncBySource(source: $source, entity: $schema, sourceId: $taskWeNeed['id'], endpoint: $endpoint);
$synchronization = $this->synchronizationService->findSyncBySource(source: $source, entity: $schema, sourceId: $taskWeNeed['id'], endpoint: $endpoint);

// Synchronize.
$synchronization = $this->oldSynchronizationService->synchronize(synchronization: $synchronization, sourceObject: $taskWeNeed, unsafe: false, mapping: $mapping);
$synchronization = $this->synchronizationService->synchronize(synchronization: $synchronization, sourceObject: $taskWeNeed, unsafe: false, mapping: $mapping);

return $data;

Expand Down

0 comments on commit 992acae

Please sign in to comment.