t() calls should be avoided in classes

Created on 25 January 2023, almost 2 years ago

Problem/Motivation

t() calls should be avoided in classes

Steps to reproduce

FILE: /Users/adriancid/Sites/drupal9/web/modules/drupal.org/node_revision_delete/src/Form/AdminSettingsForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------
 163 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 182 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

Proposed resolution

Use $this->t()

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada adriancid Montreal, Canada

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024