From 138d1a7f6758722bfe53805af6552ade2ac66e70 Mon Sep 17 00:00:00 2001 From: GitHub Actions <> Date: Fri, 4 Oct 2024 10:04:40 +0000 Subject: [PATCH] Update src from PHP Codesniffer --- .../SynchronizeCollectionHandler.php | 60 ++++++++++--------- src/Service/NewSynchronizationService.php | 8 +-- src/Service/VrijBrpService.php | 27 +++++---- 3 files changed, 51 insertions(+), 44 deletions(-) diff --git a/src/ActionHandler/SynchronizeCollectionHandler.php b/src/ActionHandler/SynchronizeCollectionHandler.php index 05f1d54..1a45501 100644 --- a/src/ActionHandler/SynchronizeCollectionHandler.php +++ b/src/ActionHandler/SynchronizeCollectionHandler.php @@ -20,13 +20,12 @@ class SynchronizeCollectionHandler implements ActionHandlerInterface /** * @param NewSynchronizationService $syncService - * @param VrijBrpService $vrijBrpService + * @param VrijBrpService $vrijBrpService */ public function __construct( private readonly NewSynchronizationService $syncService, - private readonly VrijBrpService $vrijBrpService, - ) - { + private readonly VrijBrpService $vrijBrpService, + ) { }//end __construct() @@ -41,38 +40,45 @@ public function __construct( public function getConfiguration(): array { return [ - '$id' => 'https://commongateway.nl/ActionHandler/SynchronizationCollectionHandler.ActionHandler.json', - '$schema' => 'https://docs.commongateway.nl/schemas/ActionHandler.schema.json', - 'title' => 'SynchronizationCollectionHandler', + '$id' => 'https://commongateway.nl/ActionHandler/SynchronizationCollectionHandler.ActionHandler.json', + '$schema' => 'https://docs.commongateway.nl/schemas/ActionHandler.schema.json', + 'title' => 'SynchronizationCollectionHandler', 'description' => '', - 'required' => ['source', 'schema', 'endpoint', 'idField', 'resultsPath'], - 'properties' => [ - 'source' => [ - 'type' => 'string', + 'required' => [ + 'source', + 'schema', + 'endpoint', + 'idField', + 'resultsPath', + ], + 'properties' => [ + 'source' => [ + 'type' => 'string', 'description' => 'The source where the publication belongs to.', - 'example' => 'https://commongateway.woo.nl/source/buren.openwoo.source.json', - 'required' => true, + 'example' => 'https://commongateway.woo.nl/source/buren.openwoo.source.json', + 'required' => true, ], - 'schema' => [ - 'type' => 'string', + 'schema' => [ + 'type' => 'string', 'description' => 'The publication schema.', - 'example' => 'https://commongateway.nl/woo.publicatie.schema.json', - 'reference' => 'https://commongateway.nl/woo.publicatie.schema.json', - 'required' => true, - ], 'mapping' => [ - 'type' => 'string', + 'example' => 'https://commongateway.nl/woo.publicatie.schema.json', + 'reference' => 'https://commongateway.nl/woo.publicatie.schema.json', + 'required' => true, + ], + 'mapping' => [ + 'type' => 'string', 'description' => 'The mapping for open woo to publication.', - 'example' => 'https://commongateway.nl/mapping/woo.openWooToWoo.mapping.json', - 'reference' => 'https://commongateway.nl/mapping/woo.openWooToWoo.mapping.json', - 'required' => false, + 'example' => 'https://commongateway.nl/mapping/woo.openWooToWoo.mapping.json', + 'reference' => 'https://commongateway.nl/mapping/woo.openWooToWoo.mapping.json', + 'required' => false, ], - 'endpoint' => [ + 'endpoint' => [ 'type' => 'string', 'description' => 'The endpoint of the source.', 'example' => '/wp-json/owc/openwoo/v1/items', 'required' => true, ], - 'idField' => [ + 'idField' => [ 'type' => 'string', 'description' => 'Dot-array location of the field that contains the id', 'example' => 'dossierId', @@ -84,7 +90,7 @@ public function getConfiguration(): array 'example' => 'dossierId', 'required' => true, ], - 'body' => [ + 'body' => [ 'type' => 'array', 'description' => 'Body that will be sent to the source if necessary.', 'example' => 'dossierId', @@ -100,7 +106,7 @@ public function getConfiguration(): array /** * Run the actual business logic in the appropriate server. * - * @param array $data The data from the call + * @param array $data The data from the call * @param array $configuration The configuration of the action * * @return array diff --git a/src/Service/NewSynchronizationService.php b/src/Service/NewSynchronizationService.php index 003cbf5..36fe425 100644 --- a/src/Service/NewSynchronizationService.php +++ b/src/Service/NewSynchronizationService.php @@ -37,12 +37,12 @@ class NewSynchronizationService public function __construct( private readonly GatewayResourceService $resourceService, - private readonly CallService $callService, + private readonly CallService $callService, private readonly SynchronizationService $syncService, - private readonly LoggerInterface $synchronizationLogger, + private readonly LoggerInterface $synchronizationLogger, private readonly EntityManagerInterface $entityManager, - private readonly MappingService $mappingService, - private readonly HydrationService $hydrationService, + private readonly MappingService $mappingService, + private readonly HydrationService $hydrationService, ) { }//end __construct() diff --git a/src/Service/VrijBrpService.php b/src/Service/VrijBrpService.php index d951e28..1fceb80 100644 --- a/src/Service/VrijBrpService.php +++ b/src/Service/VrijBrpService.php @@ -23,15 +23,15 @@ class VrijBrpService /** - * @param CacheService $cacheService - * @param GatewayResourceService $resourceService - * @param EntityManagerInterface $entityManager + * @param CacheService $cacheService + * @param GatewayResourceService $resourceService + * @param EntityManagerInterface $entityManager * @param NewSynchronizationService $syncService */ public function __construct( - private readonly CacheService $cacheService, - private readonly GatewayResourceService $resourceService, - private readonly EntityManagerInterface $entityManager, + private readonly CacheService $cacheService, + private readonly GatewayResourceService $resourceService, + private readonly EntityManagerInterface $entityManager, private readonly NewSynchronizationService $syncService, ) { @@ -41,7 +41,7 @@ public function __construct( /** * Set defaults for configuration of synchronize action. * - * @param array $configuration Incoming configuration. + * @param array $configuration Incoming configuration. * @return array */ public function setVrijBRPDefaults(array $configuration): array @@ -67,11 +67,12 @@ public function setVrijBRPDefaults(array $configuration): array }//end setVrijBRPDefaults() + /** * Creates a status notification. * - * @param array $data incoming data. - * @param array $config incoming configuration. + * @param array $data incoming data. + * @param array $config incoming configuration. * @return array */ public function createStatusNotification(array $data, array $config): array @@ -107,8 +108,8 @@ public function createStatusNotification(array $data, array $config): array /** * Specific extension: fetch second source and run mapping. * - * @param ObjectEntity $object Incoming object - * @param array $array Serialised incoming object + * @param ObjectEntity $object Incoming object + * @param array $array Serialised incoming object * @return ObjectEntity */ public function extendSync(ObjectEntity $object, array $array): ObjectEntity @@ -138,8 +139,8 @@ public function extendSync(ObjectEntity $object, array $array): ObjectEntity /** * Fire notification for case creation. Also extend case with data from detail endpoint. * - * @param array $data Incoming data - * @param array $config Incoming configuration + * @param array $data Incoming data + * @param array $config Incoming configuration * @return array */ public function createCaseNotification(array $data, array $config): array