Skip to content

Commit a337631

Browse files
committed
Fixed coding standards issues
1 parent 35d4b8d commit a337631

File tree

11 files changed

+64
-20
lines changed

11 files changed

+64
-20
lines changed

modules/os2forms_dawa/src/Element/DawaElementAddressMatrikula.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ public static function getCompositeElements(array $element) {
4545
$matrikula_wrapper_id = $element['#webform_id'] . '-matrikula-wrapper';
4646

4747
$elements['address']['#ajax'] = [
48-
'callback' => [DawaElementAddressMatrikula::class, 'matrikulaUpdateSelectOptions'],
48+
'callback' => [
49+
DawaElementAddressMatrikula::class,
50+
'matrikulaUpdateSelectOptions',
51+
],
4952
'event' => 'change',
5053
'wrapper' => $matrikula_wrapper_id,
5154
'progress' => [

modules/os2forms_nemid/src/Element/NemidCoaddress.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public static function validateNemidCoaddress(&$element, FormStateInterface $for
5757
*/
5858
public static function preRenderNemidCoaddress(array $element) {
5959
$element = parent::prerenderNemidElementBase($element);
60-
static::setAttributes($element, ['form-text', 'os2forms-nemid-coaddress']);
60+
static::setAttributes($element, [
61+
'form-text',
62+
'os2forms-nemid-coaddress',
63+
]);
6164
return $element;
6265
}
6366

modules/os2forms_nemid/src/Element/NemidCompanyAddress.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ public static function validateNemidCompanyAddress(&$element, FormStateInterface
5959
*/
6060
public static function preRenderNemidCompanyAddress(array $element) {
6161
$element = parent::prerenderNemidElementBase($element);
62-
static::setAttributes($element, ['form-text', 'os2forms-nemid-company-address']);
62+
static::setAttributes($element, [
63+
'form-text',
64+
'os2forms-nemid-company-address',
65+
]);
6366
return $element;
6467
}
6568

modules/os2forms_nemid/src/Element/NemidCompanyCity.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public static function validateNemidCompanyCity(&$element, FormStateInterface $f
5757
*/
5858
public static function preRenderNemidCompanyCity(array $element) {
5959
$element = parent::prerenderNemidElementBase($element);
60-
static::setAttributes($element, ['form-text', 'os2forms-nemid-company-city']);
60+
static::setAttributes($element, [
61+
'form-text',
62+
'os2forms-nemid-company-city',
63+
]);
6164
return $element;
6265
}
6366

modules/os2forms_nemid/src/Element/NemidCompanyCvr.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public static function validateNemidCompanyCvr(&$element, FormStateInterface $fo
5757
*/
5858
public static function preRenderNemidCompanyCvr(array $element) {
5959
$element = parent::prerenderNemidElementBase($element);
60-
static::setAttributes($element, ['form-text', 'os2forms-nemid-company-cvr']);
60+
static::setAttributes($element, [
61+
'form-text',
62+
'os2forms-nemid-company-cvr',
63+
]);
6164
return $element;
6265
}
6366

modules/os2forms_nemid/src/Element/NemidCompanyName.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public static function validateNemidCompanyName(&$element, FormStateInterface $f
5757
*/
5858
public static function preRenderNemidCompanyName(array $element) {
5959
$element = parent::prerenderNemidElementBase($element);
60-
static::setAttributes($element, ['form-text', 'os2forms-nemid-company-name']);
60+
static::setAttributes($element, [
61+
'form-text',
62+
'os2forms-nemid-company-name',
63+
]);
6164
return $element;
6265
}
6366

modules/os2forms_nemid/src/Element/NemidCompanyRid.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public static function validateNemidCompanyRid(&$element, FormStateInterface $fo
5757
*/
5858
public static function preRenderNemidCompanyRid(array $element) {
5959
$element = parent::prerenderNemidElementBase($element);
60-
static::setAttributes($element, ['form-text', 'os2forms-nemid-company-rid']);
60+
static::setAttributes($element, [
61+
'form-text',
62+
'os2forms-nemid-company-rid',
63+
]);
6164
return $element;
6265
}
6366

modules/os2forms_nemid/src/EventSubscriber/NemloginRedirectSubscriber.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ public function redirectToNemlogin(GetResponseEvent $event) {
122122
else {
123123
$settingFormConfig = \Drupal::config(SettingsForm::$configName);
124124
if (!$settingFormConfig->get('os2forms_nemid_hide_active_nemid_session_message')) {
125-
\Drupal::messenger()
126-
->addMessage(t('This webform requires a valid NemID authentication and is not visible without it. You currently have an active NemID authentication session. If you do not want to proceed with this webform press <a href="@logout">log out</a> to return back to the front page.', [
127-
'@logout' => $this->nemloginAuthProvider->getLogoutUrl(['query' => ['destination' => Url::fromRoute('<front>')->toString()]])
128-
->toString(),
129-
]));
125+
\Drupal::messenger()
126+
->addMessage(t('This webform requires a valid NemID authentication and is not visible without it. You currently have an active NemID authentication session. If you do not want to proceed with this webform press <a href="@logout">log out</a> to return back to the front page.', [
127+
'@logout' => $this->nemloginAuthProvider->getLogoutUrl(['query' => ['destination' => Url::fromRoute('<front>')->toString()]])
128+
->toString(),
129+
]));
130130
}
131131
}
132132
}

modules/os2forms_nemid/src/Plugin/WebformElement/NemidNemloginLink.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ public function getDefaultProperties() {
3232
* {@inheritdoc}
3333
*/
3434
public function getTranslatableProperties() {
35-
return array_merge(parent::getTranslatableProperties(), ['nemlogin_link_login_text', 'nemlogin_link_logout_text']);
35+
return array_merge(parent::getTranslatableProperties(), [
36+
'nemlogin_link_login_text',
37+
'nemlogin_link_logout_text',
38+
]);
3639
}
3740

3841
/**

modules/os2forms_sbsys/src/Plugin/WebformElement/WebformAttachmentSbsysXml.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ public function form(array $form, FormStateInterface $form_state) {
161161
|| $element_plugin->hasMultipleValues($element)) {
162162
continue;
163163
}
164-
$element_options[$element_key] = (isset($element['#title'])) ? new FormattableMarkup('@title (@key)', ['@title' => $element['#title'], '@key' => $element_key]) : $element_key;
164+
$element_options[$element_key] = (isset($element['#title'])) ? new FormattableMarkup('@title (@key)', [
165+
'@title' => $element['#title'],
166+
'@key' => $element_key,
167+
]) : $element_key;
165168
}
166169
$element_options['_custom_'] = $this->t('Custom text ...');
167170
$nemid_field_element_options = array_merge(

0 commit comments

Comments
 (0)