diff --git a/README.md b/README.md
index 4c31146..9fdee05 100644
--- a/README.md
+++ b/README.md
@@ -38,10 +38,10 @@ ________________________________________________________________________________
 ## Field settings
 
 The difference with the core *decimal*, *float* and *integer* number field types
-is that you can set *step* and *placeholder* properties on a field settings page.
-Notice edge *min* and *max* values (floor and ceil) at the right of numeric
-properties which are set automatically for the
-given *unsigned*, *precision* and *scale* storage settings of the decimal field.
+is that you can set *step* and *placeholder* properties on a field settings 
+page. Notice edge *min* and *max* values (floor and ceil) at the right of 
+numeric properties which are set automatically for the given *unsigned*, 
+*precision* and *scale* storage settings of the decimal field.
 
 ![Set step property](images/field-settings.png "Set step property")
 
diff --git a/src/Plugin/Field/FieldType/XfloatItem.php b/src/Plugin/Field/FieldType/XfloatItem.php
index da9fd23..59286fd 100644
--- a/src/Plugin/Field/FieldType/XfloatItem.php
+++ b/src/Plugin/Field/FieldType/XfloatItem.php
@@ -162,10 +162,10 @@ class XfloatItem extends XnumericItemBase {
 
     $element['unsigned'] = [
       '#type' => 'checkbox',
-      '#title' => t('Unsigned', [], ['context' => 'numeric item']),
+      '#title' => $this->t('Unsigned', [], ['context' => 'numeric item']),
       '#default_value' => $settings['unsigned'],
       '#return_value' => TRUE,
-      '#description' => t('Whether the number should be restricted to positive values (without leading minus "-" sign).'),
+      '#description' => $this->t('Whether the number should be restricted to positive values (without leading minus "-" sign).'),
       '#disabled' => $has_data,
     ];
 
diff --git a/src/Plugin/Field/FieldType/XintegerItem.php b/src/Plugin/Field/FieldType/XintegerItem.php
index f5ba698..23efb30 100644
--- a/src/Plugin/Field/FieldType/XintegerItem.php
+++ b/src/Plugin/Field/FieldType/XintegerItem.php
@@ -2,11 +2,11 @@
 
 namespace Drupal\xnumber\Plugin\Field\FieldType;
 
+use Drupal\Core\Database\Database;
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
-use Drupal\Core\TypedData\DataDefinition;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Database\Database;
+use Drupal\Core\TypedData\DataDefinition;
 use Drupal\xnumber\Utility\Xnumber as Numeric;
 
 /**
diff --git a/src/Plugin/Field/FieldType/XnumericItemBase.php b/src/Plugin/Field/FieldType/XnumericItemBase.php
index 3d298c4..27c3e1c 100644
--- a/src/Plugin/Field/FieldType/XnumericItemBase.php
+++ b/src/Plugin/Field/FieldType/XnumericItemBase.php
@@ -42,7 +42,7 @@ abstract class XnumericItemBase extends FieldItemBase {
 
     $element['base_default_value'] = [
       '#type' => 'details',
-      '#title' => t('Base Default Value'),
+      '#title' => $this->t('Base Default Value'),
       '#open' => TRUE,
       '#markup' => "<div class='description'>$base_default_value</div>",
     ];
@@ -68,20 +68,20 @@ abstract class XnumericItemBase extends FieldItemBase {
       '#title' => $this->t('Prefix', [], ['context' => 'numeric item']),
       '#default_value' => $settings['prefix'],
       '#size' => 60,
-      '#description' => t("Define a default string that should be prefixed to the value, like '$ ' or '&euro; '. Leave blank for none. Separate singular and plural values with a pipe ('pound|pounds'). Can be overriden on a form display mode."),
+      '#description' => $this->t("Define a default string that should be prefixed to the value, like '$ ' or '&euro; '. Leave blank for none. Separate singular and plural values with a pipe ('pound|pounds'). Can be overriden on a form display mode."),
     ];
     $element['suffix'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Suffix', [], ['context' => 'numeric item']),
       '#default_value' => $settings['suffix'],
       '#size' => 60,
-      '#description' => t("Define a default string that should be suffixed to the value, like ' m', ' kb/s'. Leave blank for none. Separate singular and plural values with a pipe ('pound|pounds'). Can be overriden on a form display mode."),
+      '#description' => $this->t("Define a default string that should be suffixed to the value, like ' m', ' kb/s'. Leave blank for none. Separate singular and plural values with a pipe ('pound|pounds'). Can be overriden on a form display mode."),
     ];
     $element['placeholder'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Placeholder', [], ['context' => 'numeric item']),
       '#default_value' => $settings['placeholder'] ?? '',
-      '#description' => t('The default text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format. Can be overriden on a form display mode.'),
+      '#description' => $this->t('The default text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format. Can be overriden on a form display mode.'),
     ];
 
     return $element;
diff --git a/src/Plugin/Field/FieldWidget/XnumberWidget.php b/src/Plugin/Field/FieldWidget/XnumberWidget.php
index 913430d..32ae346 100644
--- a/src/Plugin/Field/FieldWidget/XnumberWidget.php
+++ b/src/Plugin/Field/FieldWidget/XnumberWidget.php
@@ -4,10 +4,10 @@ namespace Drupal\xnumber\Plugin\Field\FieldWidget;
 
 use Drupal\Core\Field\FieldFilteredMarkup;
 use Drupal\Core\Field\FieldItemListInterface;
+use Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget;
 use Drupal\Core\Form\FormStateInterface;
-use Symfony\Component\Validator\ConstraintViolationInterface;
 use Drupal\xnumber\Utility\Xnumber as Numeric;
-use Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget;
+use Symfony\Component\Validator\ConstraintViolationInterface;
 
 /**
  * Plugin implementation of the 'xnumber' widget.
@@ -74,7 +74,7 @@ class XnumberWidget extends NumberWidget {
       '#max' => $max,
       '#default_value' => $mode_settings['default_value'],
       '#field_suffix' => "min {$settings['min']}, max {$settings['max']}",
-      '#description' => t('The default value for this form display mode. Leave blank for default = <em>@default</em>.', [
+      '#description' => $this->t('The default value for this form display mode. Leave blank for default = <em>@default</em>.', [
         '@default' => $settings['base_default_value'],
       ]),
     ];
@@ -98,7 +98,7 @@ class XnumberWidget extends NumberWidget {
       '#max' => $max,
       '#default_value' => $mode_settings['min'],
       '#field_suffix' => "min {$settings['floor']}, max {$settings['max']}",
-      '#description' => t('The minimum value that should be allowed in this field. Leave blank for default = <em>@default</em>.', [
+      '#description' => $this->t('The minimum value that should be allowed in this field. Leave blank for default = <em>@default</em>.', [
         '@default' => is_numeric($field_settings['min']) ? Numeric::toString($field_settings['min']) : $settings['floor'],
       ]),
     ];
@@ -110,7 +110,7 @@ class XnumberWidget extends NumberWidget {
       '#max' => $ceil,
       '#default_value' => $mode_settings['max'],
       '#field_suffix' => "min {$settings['min']}, max {$settings['ceil']}",
-      '#description' => t('The maximum value that should be allowed in this field. Leave blank for default = <em>@default</em>.', [
+      '#description' => $this->t('The maximum value that should be allowed in this field. Leave blank for default = <em>@default</em>.', [
         '@default' => is_numeric($field_settings['max']) ? Numeric::toString($field_settings['max']) : $settings['ceil'],
       ]),
     ];
@@ -118,7 +118,7 @@ class XnumberWidget extends NumberWidget {
       '#type' => 'textfield',
       '#title' => $this->t('Prefix', [], ['context' => 'numeric item']),
       '#default_value' => $mode_settings['prefix'],
-      '#description' => t('Define a string that should be prefixed to the value, like "$ " or "&euro; ". Leave blank for none. Separate singular and plural values with a pipe ("pound|pounds"). Leave blank for default = <em>@default</em>.', [
+      '#description' => $this->t('Define a string that should be prefixed to the value, like "$ " or "&euro; ". Leave blank for none. Separate singular and plural values with a pipe ("pound|pounds"). Leave blank for default = <em>@default</em>.', [
         '@default' => $settings['prefix'],
       ]),
     ];
@@ -126,7 +126,7 @@ class XnumberWidget extends NumberWidget {
       '#type' => 'textfield',
       '#title' => $this->t('Suffix', [], ['context' => 'numeric item']),
       '#default_value' => $mode_settings['suffix'],
-      '#description' => t('Define a string that should be suffixed to the value, like " m", " kb/s". Separate singular and plural values with a pipe ("pound|pounds"). Leave blank for default = <em>@default</em>.', [
+      '#description' => $this->t('Define a string that should be suffixed to the value, like " m", " kb/s". Separate singular and plural values with a pipe ("pound|pounds"). Leave blank for default = <em>@default</em>.', [
         '@default' => $settings['suffix'],
       ]),
     ];
@@ -134,7 +134,7 @@ class XnumberWidget extends NumberWidget {
       '#type' => 'textfield',
       '#title' => $this->t('Placeholder', [], ['context' => 'numeric item']),
       '#default_value' => $mode_settings['placeholder'],
-      '#description' => t('Text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format. Leave blank for default = <em>@default</em>.', [
+      '#description' => $this->t('Text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format. Leave blank for default = <em>@default</em>.', [
         '@default' => $settings['placeholder'],
       ]),
     ];
@@ -224,7 +224,7 @@ class XnumberWidget extends NumberWidget {
    * {@inheritdoc}
    */
   public function getFormDisplayModeSettings() {
-    $floor = $ceil = $none = t('None', [], ['context' => 'numeric item']);
+    $floor = $ceil = $none = $this->t('None', [], ['context' => 'numeric item']);
     // Base field settings.
     $field_settings = $this->getFieldSettings();
     // The current form display mode settings.
diff --git a/src/Plugin/Validation/Constraint/XnumberRangeCostraintValidator.php b/src/Plugin/Validation/Constraint/XnumberRangeCostraintValidator.php
index b65c31c..47aada2 100644
--- a/src/Plugin/Validation/Constraint/XnumberRangeCostraintValidator.php
+++ b/src/Plugin/Validation/Constraint/XnumberRangeCostraintValidator.php
@@ -2,9 +2,9 @@
 
 namespace Drupal\xnumber\Plugin\Validation\Constraint;
 
+use Drupal\xnumber\Utility\Xnumber as Numeric;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
-use Drupal\xnumber\Utility\Xnumber as Numeric;
 
 /**
  * Validates the XnumberRange constraint.
diff --git a/src/Plugin/Validation/Constraint/XnumberValidStepCostraintValidator.php b/src/Plugin/Validation/Constraint/XnumberValidStepCostraintValidator.php
index 625480c..3da1551 100644
--- a/src/Plugin/Validation/Constraint/XnumberValidStepCostraintValidator.php
+++ b/src/Plugin/Validation/Constraint/XnumberValidStepCostraintValidator.php
@@ -2,9 +2,9 @@
 
 namespace Drupal\xnumber\Plugin\Validation\Constraint;
 
+use Drupal\xnumber\Utility\Xnumber as Numeric;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
-use Drupal\xnumber\Utility\Xnumber as Numeric;
 
 /**
  * Validates the XnumberValidStep constraint.
diff --git a/src/Render/Element/Xnumber.php b/src/Render/Element/Xnumber.php
index 01763f8..18971e2 100644
--- a/src/Render/Element/Xnumber.php
+++ b/src/Render/Element/Xnumber.php
@@ -3,8 +3,8 @@
 namespace Drupal\xnumber\Render\Element;
 
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\xnumber\Utility\Xnumber as Numeric;
 use Drupal\Core\Render\Element\Number;
+use Drupal\xnumber\Utility\Xnumber as Numeric;
 
 /**
  * Overrides \Drupal\Core\Render\Element\Number class.
diff --git a/tests/src/Functional/XnumberFieldTest.php b/tests/src/Functional/XnumberFieldTest.php
index d06b8a3..8e98253 100644
--- a/tests/src/Functional/XnumberFieldTest.php
+++ b/tests/src/Functional/XnumberFieldTest.php
@@ -2,9 +2,9 @@
 
 namespace Drupal\Tests\xnumber\Functional;
 
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\field\FieldConfigInterface;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\xnumber\Utility\Xnumber as Numeric;
