Fix the issues reported by phpcs

Created on 5 July 2023, 12 months ago
Updated 29 September 2023, 9 months ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/dmg/tests/src/Functional/DmgFunctionalTestBase.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
   5 | WARNING | [x] Unused use statement
 125 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 153 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 157 | ERROR   | [ ] Parameter $guidelines is not described in comment
 181 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/dmg/tests/src/Functional/DmgTest.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 36 | WARNING | Unused variable $page.
 73 | WARNING | Unused variable $display_mode_id.
----------------------------------------------------------------------


FILE: /var/www/html/vb/d_cont/dmg/src/EntityDisplayModeListBuilder.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
 10 | ERROR   | [x] Missing class doc comment
 64 | WARNING | [ ] Only string literals should be passed to t() where possible
--------------------------------------------------------------------------------


FILE: /var/www/html/vb/d_cont/dmg/src/Form/SettingsForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
 119 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 120 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait and
     |         |     $this->t() instead
 131 | ERROR   | [x] Missing function doc comment
 153 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
     |         |     injection instead
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/dmg/dmg.module
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
 116 | ERROR | [x] Expected 1 space before "|"; 0 found
 116 | ERROR | [x] Expected 1 space after "|"; 0 found
----------------------------------------------------------------------

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dmg/

Proposed resolution

Fixing phpcs errors and raising MR.

๐Ÿ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia urvashi_vora Madhya Pradesh, India

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024