Fix the issues reported by phpcs

Created on 11 July 2023, 12 months ago
Updated 23 July 2023, 11 months ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/views_sql_twig_fields/views_sql_twig_fields.info.yml
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org
| | packaging automatically
--------------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/views_sql_twig_fields/src/TwigSqlFields.php
---------------------------------------------------------------------------------
FOUND 3 ERRORS AND 5 WARNINGS AFFECTING 8 LINES
---------------------------------------------------------------------------------
37 | ERROR | Type hint "array" missing for $options
181 | WARNING | #options values usually have to run through t() for translation
182 | WARNING | #options values usually have to run through t() for translation
183 | WARNING | #options values usually have to run through t() for translation
184 | WARNING | #options values usually have to run through t() for translation
185 | WARNING | #options values usually have to run through t() for translation
254 | ERROR | Type hint "array" missing for $parameters
268 | ERROR | Type hint "array" missing for $parameters
---------------------------------------------------------------------------------

FILE: ...sql_twig_fields/src/Plugin/views/relationship/ViewsSqlTwigFieldsRelationship.php
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------
48 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
| | instead
49 | WARNING | t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
| | instead
--------------------------------------------------------------------------------------

FILE: ...html/vb/d_cont/views_sql_twig_fields/src/Plugin/views/join/TwigSqlJoinPlugin.php
--------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------------------
28 | ERROR | Type hint "\Drupal\Core\Database\Query\SelectInterface" missing for
| | $select_query
28 | ERROR | Type hint "\Drupal\views\Plugin\views\query\QueryPluginBase" missing
| | for $view_query
--------------------------------------------------------------------------------------

FILE: ...s_sql_twig_fields/modules/views_sql_twig_webform/views_sql_twig_webform.info.yml
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org
| | packaging automatically
--------------------------------------------------------------------------------------

FILE: ...ws_sql_twig_webform/src/Plugin/views/relationship/ViewsSqlTwigWebformReverse.php
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
48 | WARNING | Unused variable $base_field.
--------------------------------------------------------------------------------------

FILE: ...g_relationship/src/Plugin/views/relationship/ViewsSqlTwigRelationshipReverse.php
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
48 | WARNING | Unused variable $base_field.
--------------------------------------------------------------------------------------

FILE: ..._fields/modules/views_sql_twig_relationship/views_sql_twig_relationship.info.yml
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org
| | packaging automatically
--------------------------------------------------------------------------------------

Time: 350ms; Memory: 12MB

Steps to reproduce

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

Remaining tasks

Patch review

📌 Task
Status

Fixed

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