Fix the issues reported by phpcs

Created on 10 April 2023, over 1 year ago
Updated 25 April 2023, over 1 year ago

Problem/Motivation

FILE: /var/www/html/contribution/web/modules/contrib/afew/src/Plugin/Field/FieldWidget/TextFormatWidget.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
 49 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 52 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 77 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/contribution/web/modules/contrib/afew/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 14 WARNINGS AFFECTING 14 LINES
----------------------------------------------------------------------
  1 | WARNING | File encoding is invalid, expected UTF-8
 15 | WARNING | Line exceeds 80 characters; contains 81 characters
 17 | WARNING | Line exceeds 80 characters; contains 82 characters
 21 | WARNING | Line exceeds 80 characters; contains 84 characters
 24 | WARNING | Line exceeds 80 characters; contains 83 characters
 26 | WARNING | Line exceeds 80 characters; contains 89 characters
 27 | WARNING | Line exceeds 80 characters; contains 81 characters
 28 | WARNING | Line exceeds 80 characters; contains 84 characters
 49 | WARNING | Line exceeds 80 characters; contains 81 characters
 58 | WARNING | Line exceeds 80 characters; contains 91 characters
 59 | WARNING | Line exceeds 80 characters; contains 115 characters
 60 | WARNING | Line exceeds 80 characters; contains 88 characters
 61 | WARNING | Line exceeds 80 characters; contains 154 characters
 62 | WARNING | Line exceeds 80 characters; contains 87 characters
----------------------------------------------------------------------



FILE: /var/www/html/contribution/web/modules/contrib/afew/afew.module
----------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
  9 | WARNING | [x] Unused use statement
 17 | WARNING | [ ] Unused variable $field_definition.
 41 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml afew 
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India himanshu_jhaloya Indore

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.71.5 2024