Skip to content

Commit

Permalink
Remove no longer used uses
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Aug 30, 2024
1 parent 665da3c commit 6e335d8
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions src/Service/ZgwToVrijbrpService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,12 @@

Check failure on line 2 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Missing file doc comment
namespace CommonGateway\ZgwVrijBRPRequestBundle\Service;

use Adbar\Dot;
use App\Entity\Gateway as Source;
use App\Entity\ObjectEntity;
use App\Entity\Synchronization;
use App\Event\ActionEvent;
use App\Service\SynchronizationService;
use CommonGateway\CoreBundle\Service\CacheService;
use CommonGateway\CoreBundle\Service\CallService;
use CommonGateway\CoreBundle\Service\GatewayResourceService;
use CommonGateway\CoreBundle\Service\MappingService;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Mime\MimeTypes;

/**
* A service for triggering actions that create api requests to VrijBRP for ZGW cases with specific 'e-dienst' case types.
Expand Down Expand Up @@ -78,16 +67,19 @@ public function checkCasesHandler(array $data, array $configuration): array
{
// Create the DateTime object for 10 minutes ago.
$beforeDateTime = (new DateTime())->modify(modifier: $configuration['beforeTimeModifier']);

// Todo: Focus on 'Naamgebruik', = 'B0348'
// Todo: Check / get cases for zaaktype identificatie in ['B0328', 'B0255', 'B0348', 'B1425', 'B0237', 'B0337', 'B0360', 'B0366']
// (first 4 are from NaamgebruikVrijBRPBundle, last 4 are from GeboorteVrijBRPBundle)
// Todo: FirstRegistration might work differently? documents.0.zaak.zaaktype.identificatie in ['B333', 'B334']

Check failure on line 70 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Whitespace found at end of line
/**

Check failure on line 71 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Block comments must be started with /*

Check failure on line 71 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
* Todo: Focus on 'Naamgebruik', = 'B0348'

Check warning on line 72 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Comment refers to a TODO task "Focus on 'Naamgebruik', = 'B0348'"
* Todo: Check / get cases for zaaktype identificatie in ['B0328', 'B0255', 'B0348', 'B1425', 'B0237', 'B0337', 'B0360', 'B0366']

Check warning on line 73 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 137 characters

Check warning on line 73 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Comment refers to a TODO task "Check / get cases for zaaktype identificatie in ['B0328', 'B0255', 'B0348', 'B1425', 'B0237', 'B0337', 'B0360', 'B0366'"
* (first 4 are from NaamgebruikVrijBRPBundle, last 4 are from GeboorteVrijBRPBundle)
* Todo: FirstRegistration might work differently? documents.0.zaak.zaaktype.identificatie in ['B333', 'B334']

Check warning on line 75 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Comment refers to a TODO task "FirstRegistration might work differently? documents.0.zaak.zaaktype.identificatie in ['B333', 'B334'"
*/

// Search all cases we should create Requests for.
$result = $this->cacheService->searchObjects(
[
'_self.synchronizations' => 'IS NULL',
'embedded.zaaktype.identificatie' => ['like' => 'vrijbrp-'],
'embedded.zaaktype.identificatie' => 'B0348', // in ['B0328', 'B0255', 'B0348', 'B1425', 'B0237', 'B0337', 'B0360', 'B0366']

Check warning on line 82 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 140 characters
'_self.dateCreated' => ['before' => $beforeDateTime->format(format: 'Y-m-d H:i:s')],
],
[$configuration['schema']]
Expand All @@ -100,7 +92,11 @@ public function checkCasesHandler(array $data, array $configuration): array

// Loop through results and start creating Requests.
foreach ($result['results'] as $zaak) {
// Todo: throw event for "vrijbrp.zaak.created" for other 9 e-diensten. With ['object' => $zaak]
/**
* Todo: throw event for "vrijbrp.zaak.created" for other 9 e-diensten. With ['object' => $zaak]

Check warning on line 96 in src/Service/ZgwToVrijbrpService.php

View workflow job for this annotation

GitHub Actions / build

Comment refers to a TODO task "throw event for "vrijbrp.zaak.created" for other 9 e-diensten. With ['object' => $zaak"
* Are we sure a sync object is created after throwing this event?
*/

// Throw (async) event for creating a Request for this Case.
$event = new ActionEvent('commongateway.action.event', ['body' => $zaak], 'vrijbrp.caseToRequest.sync');
$this->eventDispatcher->dispatch($event, 'commongateway.action.event');
Expand Down

0 comments on commit 6e335d8

Please sign in to comment.