Problem/Motivation

FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 12 LINES
----------------------------------------------------------------------
 836 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 839 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 842 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait
     |         | and $this->t() instead
 845 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait

Steps to reproduce

Run phpcs.

Proposed resolution

use $this->t() instead of t().

Issue fork superfish-3282645

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

akshaydalvi212 created an issue. See original summary.

akshaydalvi212’s picture

Issue summary: View changes
akshaydalvi212’s picture

Assigned: akshaydalvi212 » Unassigned
Status: Active » Needs review
StatusFileSize
new3.7 KB

Replace the t() with $this->t().

omkar-pd’s picture

Status: Needs review » Reviewed & tested by the community

Looks good! moving this to RTBC.

Charchil Khandelwal made their first commit to this issue’s fork.

lobsterr’s picture

Status: Reviewed & tested by the community » Closed (won't fix)