Drupal Coding Standards Issues | phpcs

Created on 8 December 2022, about 2 years ago
Updated 12 October 2023, about 1 year ago

Problem/Motivation

Getting following error/warnings

FILE: /app/modules/contrib/email_registration/email_registration.install
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
19 | ERROR | The array declaration extends to column 281 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/email_registration/email_registration.module
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
83 | ERROR | The array declaration extends to column 152 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/email_registration/tests/src/Functional/Plugin/Commerce/CheckoutPane/EmailRegistrationLoginTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
258 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

Time: 2.96 secs; Memory: 12MB

Steps to reproduce

Run following command

phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,md,yml modules/contrib/email_registration/

Proposed resolution

Above error/warnings need to be fixed

Remaining tasks

Note: We are not covering README.txt file, as it has some line of Code.
EG.

$settings['locale_custom_strings_en'][''] = [
  'Unrecognized username or password. <a href=":password">Forgot your password?</a>' => 'Unrecognized e-mail address or password. <a href=":password">Forgot your password?</a>',
];
๐Ÿ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia samit.310@gmail.com

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024