t() calls should be avoided in classes

Created on 27 April 2023, over 1 year ago

Problem/Motivation

FILE: ...contrib/reference_table_formatter/tests/src/Kernel/EntityReferenceTest.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
 425 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         | $this->t() instead
 432 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         | $this->t() instead
 447 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         | $this->t() instead
 448 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         | $this->t() instead
 449 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         | $this->t() instead
--------------------------------------------------------------------------------


FILE: ...b/reference_table_formatter/tests/src/Kernel/EntityToTableRendererTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 81 | ERROR | [x] list(...) is forbidden, use [...] instead.
--------------------------------------------------------------------------------


FILE: ...eb/modules/contrib/reference_table_formatter/src/EntityToTableRenderer.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 112 | ERROR | The array declaration extends to column 88 (the limit is 80).
     |       | The array content should be split up over multiple lines
 121 | ERROR | The array declaration extends to column 94 (the limit is 80).
     |       | The array content should be split up over multiple lines
--------------------------------------------------------------------------------


FILE: ...ormatter/src/Plugin/Field/FieldFormatter/EntityReferenceTableFormatter.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 155 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------

Time: 1.99 secs; Memory: 14MB
📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India Rohit Rana

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

Comments & Activities

Production build 0.71.5 2024