Skip to content

Commit fc49a16

Browse files
committed
Applied coding standards
1 parent 2ce4685 commit fc49a16

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

modules/os2forms_digital_post/src/Helper/DigitalPostHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function sendDigitalPost(string $type, Message $message, ?ForsendelseI $f
7777
// RecipientID should be the same in Message and Forsendelse,
7878
// so fetch it from Message as it is always set.
7979
$msg = sprintf('Sent digital post of type %s to %s.', $type, $message->getMessageHeader()->getRecipient()->getRecipientID());
80+
// If the cause is a submission, add webform id to audit logging message.
8081
$msg .= $submission ? sprintf(' Webform id %s.', $submission->getWebform()->id()) : '';
8182
$this->auditLogger->info('DigitalPost', $msg);
8283

modules/os2forms_fasit/src/Helper/FasitHelper.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ class FasitHelper {
3535
];
3636

3737
public function __construct(
38-
private readonly ClientInterface $client,
39-
private readonly EntityTypeManagerInterface $entityTypeManager,
40-
private readonly Settings $settings,
41-
private readonly CertificateLocatorHelper $certificateLocator,
42-
private readonly Logger $auditLogger,
38+
private readonly ClientInterface $client,
39+
private readonly EntityTypeManagerInterface $entityTypeManager,
40+
private readonly Settings $settings,
41+
private readonly CertificateLocatorHelper $certificateLocator,
42+
private readonly Logger $auditLogger,
4343
) {
4444
}
4545

@@ -239,7 +239,7 @@ private function uploadDocument(array $uploads, string $submissionId, array $han
239239
throw new FasitResponseException(sprintf('Expected status code 200, received %d', $response->getStatusCode()));
240240
}
241241

242-
$msg = sprintf('Successfully uploaded document %s to cpr %s in Fasit. Webform id: %s', $fasitDocumentTitle, $fasitCpr, $submission->getWebform()->id());
242+
$msg = sprintf('Successfully uploaded document %s to cpr %s in Fasit. Webform id %s.', $fasitDocumentTitle, $fasitCpr, $submission->getWebform()->id());
243243
$this->auditLogger->info('Fasit', $msg);
244244
}
245245

@@ -329,7 +329,7 @@ private function uploadAttachment(string $submissionId, array $handlerConfigurat
329329
* The temp filename.
330330
* @param string $webformId
331331
* The webform id.
332-
*
332+
*
333333
* @throws \Drupal\os2forms_fasit\Exception\CertificateLocatorException
334334
* Certificate locator exception.
335335
* @throws \Drupal\os2forms_fasit\Exception\FasitResponseException
@@ -383,9 +383,10 @@ private function uploadFile(string $originalFilename, string $tempFilename, stri
383383
throw new FasitResponseException('Could not get upload id from response');
384384
}
385385

386-
// Note, that this does not mean a document has been sent to a citizen case in Fasit yet.
387-
// This is done later by uploadDocument. The file has simply been made ready.
388-
$msg = sprintf('Successfully uploaded file %s to Fasit. Webform id: %s', $originalFilename, $webformId);
386+
// Note, that this does not mean a document has been sent,
387+
// to a citizen case in Fasit yet. This is done later by uploadDocument.
388+
// The file has simply been made ready.
389+
$msg = sprintf('Successfully uploaded file %s to Fasit. Webform id %s.', $originalFilename, $webformId);
389390
$this->auditLogger->info('Fasit', $msg);
390391

391392
return ['filename' => $originalFilename, 'id' => $content['id']];

0 commit comments

Comments
 (0)