Skip to content

Commit 33d0c3b

Browse files
committed
Applied coding standards
1 parent 34ec714 commit 33d0c3b

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

modules/os2forms_fasit/src/Form/SettingsForm.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ public function buildForm(array $form, FormStateInterface $form_state): array {
141141
'#states' => [
142142
'visible' => [
143143
':input[name="certificate[certificate_provider]"]' => ['value' => self::PROVIDER_TYPE_FORM],
144-
'and',
145144
':input[name="certificate[locator_type]"]' => ['value' => CertificateLocatorHelper::LOCATOR_TYPE_AZURE_KEY_VAULT],
146145
],
147146
],
@@ -164,7 +163,6 @@ public function buildForm(array $form, FormStateInterface $form_state): array {
164163
'#states' => [
165164
'required' => [
166165
':input[name="certificate[certificate_provider]"]' => ['value' => self::PROVIDER_TYPE_FORM],
167-
'and',
168166
':input[name="certificate[locator_type]"]' => ['value' => CertificateLocatorHelper::LOCATOR_TYPE_AZURE_KEY_VAULT],
169167
],
170168
],
@@ -177,7 +175,6 @@ public function buildForm(array $form, FormStateInterface $form_state): array {
177175
'#states' => [
178176
'visible' => [
179177
':input[name="certificate[certificate_provider]"]' => ['value' => self::PROVIDER_TYPE_FORM],
180-
'and',
181178
':input[name="certificate[locator_type]"]' => ['value' => CertificateLocatorHelper::LOCATOR_TYPE_FILE_SYSTEM],
182179
],
183180
],
@@ -189,8 +186,7 @@ public function buildForm(array $form, FormStateInterface $form_state): array {
189186
'#states' => [
190187
'required' => [
191188
':input[name="certificate[certificate_provider]"]' => ['value' => self::PROVIDER_TYPE_FORM],
192-
'and',
193-
':input[name="certificate[locator_type]"]' => ['value' => CertificateLocatorHelper::LOCATOR_TYPE_FILE_SYSTEM]
189+
':input[name="certificate[locator_type]"]' => ['value' => CertificateLocatorHelper::LOCATOR_TYPE_FILE_SYSTEM],
194190
],
195191
],
196192
],

modules/os2forms_fasit/src/Helper/FasitHelper.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ private function uploadDocument(array $uploads, string $submissionId, array $han
221221
'Content-Type' => 'application/xml',
222222
],
223223
'body' => $body,
224-
// 'cert' => $this->settings->getKeyValue(),
225-
// 'cert' => $this->getCertificate(),
226224
];
227225

228226
// Attempt upload.
@@ -553,25 +551,6 @@ public function pingApi(): void {
553551
}
554552
}
555553

556-
/**
557-
* Get certificate.
558-
*
559-
* @throws InvalidSettingException
560-
*/
561-
private function getCertificate(): mixed {
562-
$config = $this->settings->getFasitCertificateConfig();
563-
$provider = $config['certificate_provider'];
564-
if (SettingsForm::PROVIDER_TYPE_KEY === $provider) {
565-
return $this->settings->getKeyValue();
566-
}
567-
elseif (SettingsForm::PROVIDER_TYPE_FORM === $provider) {
568-
[$certificateOptions, $tempCertFilename] = $this->getCertificateOptionsAndTempCertFilename();
569-
return $certificateOptions;
570-
}
571-
572-
throw new InvalidSettingException('Invalid certificate configuration');
573-
}
574-
575554
/**
576555
* Gets certificate options and temp certificate filename.
577556
*

modules/os2forms_fasit/src/Helper/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getFasitApiVersion(): ?string {
5050
}
5151

5252
/**
53-
* Get Fasit configuration selector
53+
* Get Fasit configuration selector.
5454
*/
5555
public function getFasitCertificateConfig(): ?array {
5656
return $this->get(SettingsForm::CERTIFICATE);

0 commit comments

Comments
 (0)