Fix the issues reported by PHPCS

Created on 17 April 2023, almost 2 years ago
Updated 18 April 2023, almost 2 years ago

Problem/Motivation

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/commerce_jcc/README.md
------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------
7 | WARNING | Line exceeds 80 characters; contains 87 characters
11 | WARNING | Line exceeds 80 characters; contains 165 characters
12 | WARNING | Line exceeds 80 characters; contains 150 characters
------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/commerce_jcc/src/Plugin/Commerce/PaymentGateway/RedirectCheckout.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
110 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/commerce_jcc/src/Controller/RedirectController.php
----------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------
89 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
105 | ERROR | [x] Each PHP statement must be on a line by itself
202 | ERROR | [ ] Missing parameter comment
204 | ERROR | [ ] Description for the @return value is missing
243 | ERROR | [x] Expected 1 blank line after function; 0 found
244 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/commerce_jcc/templates/commerce-jcc-pay-template.html.twig
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
25 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/commerce_jcc/commerce_jcc.module
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
26 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

Time: 529ms; Memory: 10MB

Steps to reproduce

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

Proposed resolution

Fix all the errors and warnings for Drupal and DrupalPractice coding standards

Remaining tasks

Patch Review

📌 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

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