diff --git a/src/Form/FormAlter.php b/src/Form/FormAlter.php
index 7a921eb..1ece6cc 100644
--- a/src/Form/FormAlter.php
+++ b/src/Form/FormAlter.php
@@ -90,12 +90,12 @@ class FormAlter implements ContainerInjectionInterface {
       $form['#entity_builders'][] = [$this, 'entityFormEntityBuild'];
       $allowed_block_categories = $display->getThirdPartySetting('layout_builder_restrictions', 'allowed_block_categories', []);
       $form['layout']['layout_builder_restrictions']['allowed_block_categories'] = [
-        '#title' => t('Default restriction for new categories of blocks not listed below.'),
+        '#title' => $this->t('Default restriction for new categories of blocks not listed below.'),
         '#description_display' => 'before',
         '#type' => 'radios',
         '#options' => [
-          "allowed" => t('Allow all blocks from newly available categories.'),
-          "restricted" => t('Restrict all blocks from newly available categories.'),
+          "allowed" => $this->t('Allow all blocks from newly available categories.'),
+          "restricted" => $this->t('Restrict all blocks from newly available categories.'),
         ],
         '#parents' => ['layout_builder_restrictions', 'allowed_block_categories'],
         '#default_value' => !empty($allowed_block_categories) ? "restricted" : "allowed",
@@ -114,7 +114,7 @@ class FormAlter implements ContainerInjectionInterface {
       // Block settings.
       $form['layout']['layout_builder_restrictions']['allowed_blocks'] = [
         '#type' => 'details',
-        '#title' => t('Blocks available for placement'),
+        '#title' => $this->t('Blocks available for placement'),
         '#states' => [
           'disabled' => [
             ':input[name="layout[enabled]"]' => ['checked' => FALSE],
@@ -156,9 +156,9 @@ class FormAlter implements ContainerInjectionInterface {
         $category_form['restriction_behavior'] = [
           '#type' => 'radios',
           '#options' => [
-            "all" => t('Allow all existing & new %category blocks.', ['%category' => $data['label']]),
-            "whitelisted" => t('Allow specific %category blocks (whitelist):', ['%category' => $data['label']]),
-            "blacklisted" => t('Restrict specific %category blocks (blacklist):', ['%category' => $data['label']]),
+            "all" => $this->t('Allow all existing & new %category blocks.', ['%category' => $data['label']]),
+            "whitelisted" => $this->t('Allow specific %category blocks (whitelist):', ['%category' => $data['label']]),
+            "blacklisted" => $this->t('Restrict specific %category blocks (blacklist):', ['%category' => $data['label']]),
           ],
           '#default_value' => $category_setting,
           '#parents' => [
@@ -196,7 +196,7 @@ class FormAlter implements ContainerInjectionInterface {
         if ($category == 'Custom blocks' || $category == 'Custom block types') {
           $category_form['description'] = [
             '#type' => 'container',
-            '#children' => t('<p>In the event both <em>Custom Block Types</em> and <em>Custom Blocks</em> restrictions are enabled, <em>Custom Block Types</em> restrictions are disregarded.</p>'),
+            '#children' => $this->t('<p>In the event both <em>Custom Block Types</em> and <em>Custom Blocks</em> restrictions are enabled, <em>Custom Block Types</em> restrictions are disregarded.</p>'),
             '#states' => [
               'visible' => [
                 ':input[name="layout_builder_restrictions[allowed_blocks][' . $category . '][restriction]"]' => ['value' => "restricted"],
@@ -210,7 +210,7 @@ class FormAlter implements ContainerInjectionInterface {
       $allowed_layouts = (isset($third_party_settings['allowed_layouts'])) ? $third_party_settings['allowed_layouts'] : [];
       $layout_form = [
         '#type' => 'details',
-        '#title' => t('Layouts available for sections'),
+        '#title' => $this->t('Layouts available for sections'),
         '#parents' => ['layout_builder_restrictions', 'allowed_layouts'],
         '#states' => [
           'disabled' => [
@@ -224,8 +224,8 @@ class FormAlter implements ContainerInjectionInterface {
       $layout_form['layout_restriction'] = [
         '#type' => 'radios',
         '#options' => [
-          "all" => t('Allow all existing & new layouts.'),
-          "restricted" => t('Allow only specific layouts:'),
+          "all" => $this->t('Allow all existing & new layouts.'),
+          "restricted" => $this->t('Allow only specific layouts:'),
         ],
         '#default_value' => !empty($allowed_layouts) ? "restricted" : "all",
       ];
diff --git a/src/Form/RestrictionPluginConfigForm.php b/src/Form/RestrictionPluginConfigForm.php
index 5db1c1b..db43161 100644
--- a/src/Form/RestrictionPluginConfigForm.php
+++ b/src/Form/RestrictionPluginConfigForm.php
@@ -62,8 +62,13 @@ class RestrictionPluginConfigForm extends FormBase {
 
     $form['plugin-table'] = [
       '#type' => 'table',
-      '#header' => [t('Plugin'), t('ID'), t('Enabled'), t('Weight')],
-      '#empty' => t('There are no restriction plugins defined.'),
+      '#header' => [
+        $this->t('Plugin'),
+        $this->t('ID'),
+        $this->t('Enabled'),
+        $this->t('Weight'),
+      ],
+      '#empty' => $this->t('There are no restriction plugins defined.'),
       // TableDrag: Each array value is a list of callback arguments for
       // drupal_add_tabledrag().
       '#tabledrag' => [
@@ -98,7 +103,7 @@ class RestrictionPluginConfigForm extends FormBase {
       ];
       $form['plugin-table'][$id]['enabled'] = [
         '#type' => 'checkbox',
-        '#title' => t('Enabled'),
+        '#title' => $this->t('Enabled'),
         '#title_display' => 'invisible',
         '#default_value' => $data['enabled'],
         // Classify the weight element for #tabledrag.
@@ -107,7 +112,7 @@ class RestrictionPluginConfigForm extends FormBase {
       // TableDrag: Weight column element.
       $form['plugin-table'][$id]['weight'] = [
         '#type' => 'weight',
-        '#title' => t('Weight for @title', ['@title' => $id]),
+        '#title' => $this->t('Weight for @title', ['@title' => $id]),
         '#title_display' => 'invisible',
         '#default_value' => $data['weight'],
         // Classify the weight element for #tabledrag.
diff --git a/src/Plugin/LayoutBuilderRestriction/EntityViewModeRestriction.php b/src/Plugin/LayoutBuilderRestriction/EntityViewModeRestriction.php
index 0e543dc..e718b5e 100644
--- a/src/Plugin/LayoutBuilderRestriction/EntityViewModeRestriction.php
+++ b/src/Plugin/LayoutBuilderRestriction/EntityViewModeRestriction.php
@@ -253,7 +253,7 @@ class EntityViewModeRestriction extends LayoutBuilderRestrictionBase {
         }
       }
       if ($has_restrictions) {
-        return t("There is a restriction on %block placement in the %layout %region region for %type content.", [
+        return $this->t("There is a restriction on %block placement in the %layout %region region for %type content.", [
           "%block" => $definition['admin_label'],
           "%layout" => $layout_id_to,
           "%region" => $region_to,
diff --git a/src/Routing/RouteSubscriber.php b/src/Routing/RouteSubscriber.php
index 58a8c28..53b01d0 100644
--- a/src/Routing/RouteSubscriber.php
+++ b/src/Routing/RouteSubscriber.php
@@ -23,7 +23,8 @@ class RouteSubscriber extends RouteSubscriberBase {
       // Provide validation to the Layout Builder MoveBlock form.
       $route->setDefault('_form', '\Drupal\layout_builder_restrictions\Form\MoveBlockForm');
     }
-    // Add inline block filtering to parent class Drupal\layout_builder\Controller\ChooseBlockController.
+    // Add inline block filtering to parent class
+    // Drupal\layout_builder\Controller\ChooseBlockController.
     if ($route = $collection->get('layout_builder.choose_block')) {
       $defaults = $route->getDefaults();
       $defaults['_controller'] = '\Drupal\layout_builder_restrictions\Controller\ChooseBlockController::build';
diff --git a/src/Traits/PluginHelperTrait.php b/src/Traits/PluginHelperTrait.php
index 71b59d2..5432c3e 100644
--- a/src/Traits/PluginHelperTrait.php
+++ b/src/Traits/PluginHelperTrait.php
@@ -148,7 +148,7 @@ trait PluginHelperTrait {
    *
    * @param string $category
    *   The identifier of the category.
-   * @param array $allowed_block_categories.
+   * @param array $allowed_block_categories
    *   The entity view mode's allowed block categories.
    *
    * @return bool
diff --git a/tests/src/FunctionalJavascript/BlacklistedRestrictionsTest.php b/tests/src/FunctionalJavascript/BlacklistedRestrictionsTest.php
index 1d1654e..b7b7b17 100644
--- a/tests/src/FunctionalJavascript/BlacklistedRestrictionsTest.php
+++ b/tests/src/FunctionalJavascript/BlacklistedRestrictionsTest.php
@@ -131,7 +131,8 @@ class BlacklistedRestrictionsTest extends WebDriverTestBase {
     $element->click();
     $page->pressButton('Save');
 
-    // Establish that the 'body' field is still present, because it has not been explicitly blacklisted.
+    // Establish that the 'body' field is still present,
+    // because it has not been explicitly blacklisted.
     $this->drupalGet("$field_ui_prefix/display/default");
     $assert_session->linkExists('Manage layout');
     $this->clickLink('Manage layout');
@@ -160,7 +161,8 @@ class BlacklistedRestrictionsTest extends WebDriverTestBase {
     $assert_session->checkboxChecked('edit-layout-builder-restrictions-allowed-blocks-inline-blocks-restriction-all');
     $assert_session->checkboxNotChecked('edit-layout-builder-restrictions-allowed-blocks-inline-blocks-restriction-blacklisted');
 
-    // Select 'blacklist' inline block types, but do not specify any to be blacklisted.
+    // Select 'blacklist' inline block types, but do not specify any to be
+    // blacklisted.
     $element = $page->find('xpath', '//*[@id="edit-layout-builder-restrictions-allowed-blocks-inline-blocks-restriction-blacklisted"]');
     $element->click();
     $page->pressButton('Save');
@@ -236,4 +238,5 @@ class BlacklistedRestrictionsTest extends WebDriverTestBase {
     $assert_session->linkExists('Basic Block 2');
     $assert_session->linkNotExists('Alternate Block 1');
   }
+
 }
diff --git a/tests/src/FunctionalJavascript/LayoutRestrictionsTest.php b/tests/src/FunctionalJavascript/LayoutRestrictionsTest.php
index aca79ef..68a728e 100644
--- a/tests/src/FunctionalJavascript/LayoutRestrictionsTest.php
+++ b/tests/src/FunctionalJavascript/LayoutRestrictionsTest.php
@@ -2,8 +2,6 @@
 
 namespace Drupal\Tests\layout_builder_restrictions\FunctionalJavascript;
 
-use Drupal\block_content\Entity\BlockContent;
-use Drupal\block_content\Entity\BlockContentType;
 use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
 
 /**
