Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/GW-1736/test-with-mappin…
Browse files Browse the repository at this point in the history
…g' into feature/GW-1736/test-with-mapping
  • Loading branch information
rjzondervan committed Oct 8, 2024
2 parents 956aa20 + 52a7c56 commit 33b20b9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

| Class | Documentation |
|-------|--------------|
| Notification | [cloudevents.notification.md](cloudevents.notification.md) |
| CloudEvent | [cloudevents.notification.md](cloudevents.notification.md) |
2 changes: 1 addition & 1 deletion docs/schema/all_schema_classes.puml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: All schemas
footer: Common Gateway Plugin | Commongateway | Vrijbrptozgwbundle
header: Schema
class Notification {
class CloudEvent {
+ specversion: string
+ id: string
+ source: string
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/cloudevents.notification.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Notification
# CloudEvent

A notification object conform ZGW Notification API: https://petstore.swagger.io/?url=https://raw.githubusercontent.com/VNG-Realisatie/notificaties-api/1.0.0/src/openapi.yaml#/notificaties/notificaties_create

Expand Down
4 changes: 2 additions & 2 deletions docs/schema/cloudevents.notification.puml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@startuml
title: Notification
title: CloudEvent
footer: Common Gateway Plugin | Commongateway | Vrijbrptozgwbundle
header: Schema

class Notification {
class CloudEvent {
+ specversion: string
+ id: string
+ source: string
Expand Down
16 changes: 8 additions & 8 deletions src/Service/NewSynchronizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ public function synchronizeFromSource(Synchronization $synchronization, array $s

// create new object if no object exists

Check failure on line 83 in src/Service/NewSynchronizationService.php

View workflow job for this annotation

GitHub Actions / build

Inline comments must start with a capital letter

Check failure on line 83 in src/Service/NewSynchronizationService.php

View workflow job for this annotation

GitHub Actions / build

Inline comments must end in full-stops, exclamation marks, or question marks
if (!$synchronization->getObject()) {

Check failure on line 84 in src/Service/NewSynchronizationService.php

View workflow job for this annotation

GitHub Actions / build

Operator ! prohibited; use === FALSE instead
// isset($this->io) && $this->io->text('creating new objectEntity');
// $this->synchronizationLogger->info('creating new objectEntity');
// $object = new ObjectEntity($synchronization->getEntity());
// $object->addSynchronization($synchronization);
// $this->entityManager->persist($object);
// var_dump('new');
// $this->entityManager->persist($synchronization);
// isset($this->io) && $this->io->text('creating new objectEntity');
// $this->synchronizationLogger->info('creating new objectEntity');
// $object = new ObjectEntity($synchronization->getEntity());
// $object->addSynchronization($synchronization);
// $this->entityManager->persist($object);
// var_dump('new');
// $this->entityManager->persist($synchronization);
$oldDateModified = null;
} else {

Check warning on line 93 in src/Service/NewSynchronizationService.php

View workflow job for this annotation

GitHub Actions / build

The method synchronizeFromSource uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
$oldDateModified = $synchronization->getObject()->getDateModified()->getTimestamp();
Expand Down Expand Up @@ -270,7 +270,7 @@ public function synchronizeFromNotificationHandler(array $data, array $configura
$url = $data['body']['data']['resourceUrl'];
$sourceId = $data['body']['data']['zaakId'];

$length = strlen($url) - strlen($source->getLocation()) - strlen($sourceId) -1;
$length = (strlen($url) - strlen($source->getLocation()) - strlen($sourceId) - 1);

$endpoint = substr(string: $url, offset: strlen(string: $source->getLocation()), length: $length);

Expand Down

0 comments on commit 33b20b9

Please sign in to comment.