From 3ba9b35fc85cd9250920ff56f509a589fe8967d9 Mon Sep 17 00:00:00 2001 From: Kevin Torres <katorres@seedem.co> Date: Fri, 6 Dec 2024 15:33:44 -0500 Subject: [PATCH] Coding standards fix --- src/EventSubscriber/AccessCheck.php | 8 +++++--- .../Field/FieldWidget/ExclusivAccessFieldWidget.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/EventSubscriber/AccessCheck.php b/src/EventSubscriber/AccessCheck.php index 8ac94c1..4e62ac5 100644 --- a/src/EventSubscriber/AccessCheck.php +++ b/src/EventSubscriber/AccessCheck.php @@ -41,9 +41,11 @@ class AccessCheck implements EventSubscriberInterface { /** * Constructs a new EditAdAccessEventSubscriber object. */ - public function __construct(AccountProxyInterface $current_user, - CurrentRouteMatch $current_route_match, - DefaultExceptionHtmlSubscriber $exception_default_html) { + public function __construct( + AccountProxyInterface $current_user, + CurrentRouteMatch $current_route_match, + DefaultExceptionHtmlSubscriber $exception_default_html, + ) { $this->currentUser = $current_user; $this->currentRouteMatch = $current_route_match; diff --git a/src/Plugin/Field/FieldWidget/ExclusivAccessFieldWidget.php b/src/Plugin/Field/FieldWidget/ExclusivAccessFieldWidget.php index d8ac995..c05d174 100644 --- a/src/Plugin/Field/FieldWidget/ExclusivAccessFieldWidget.php +++ b/src/Plugin/Field/FieldWidget/ExclusivAccessFieldWidget.php @@ -33,7 +33,7 @@ class ExclusivAccessFieldWidget extends WidgetBase { $element['value'] = [ '#type' => 'checkbox', '#title' => 'activate', - '#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : FALSE, + '#default_value' => $items[$delta]->value ?? FALSE, ]; $state = \Drupal::state()->get('exclusiv_access'); -- GitLab