t() calls should be avoided in classes.

Created on 11 July 2024, 6 months ago
Updated 12 July 2024, 6 months ago

Problem/Motivation


FILE: .../modules/contrib/playwire/src/Plugin/Field/FieldType/PlaywireFieldType.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  78 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         | $this->t() instead
 107 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         | $this->t() instead
 110 | WARNING | t() calls should be avoided in classes, use
     |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         | $this->t() instead
--------------------------------------------------------------------------------


FILE: ...contrib/playwire/src/Plugin/Field/FieldFormatter/PlaywireFormatterType.php
--------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 9 LINES
--------------------------------------------------------------------------------
 11 | ERROR | [x] Use statements should be sorted alphabetically. The first
    |       |     wrong one is Drupal\Core\Field\FieldDefinitionInterface.
 38 | ERROR | [x] The first parameter of a multi-line function declaration must
    |       |     be on the line after the opening bracket
 39 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 4 spaces but found 30
 40 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 4 spaces but found 30
 41 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 4 spaces but found 30
 42 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 4 spaces but found 30
 43 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 4 spaces but found 30
 44 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 4 spaces but found 30
 45 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 4 spaces but found 30
 45 | ERROR | [x] The closing parenthesis of a multi-line function declaration
    |       |     must be on a new line
--------------------------------------------------------------------------------


FILE: ...dules/contrib/playwire/src/Plugin/Field/FieldWidget/PlaywireWidgetType.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 75 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------

Time: 1.17 secs; Memory: 10MB

📌 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