Fix the issues reported by phpcs

Created on 27 June 2023, over 1 year ago
Updated 16 August 2023, over 1 year ago

Problem/Motivation

There are some Drupal coding standard errors which needs to to be fixed.

Steps to reproduce

Run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml web/modules/contrib/lb_promo

FILE: .../lampp/htdocs/testing/web/modules/contrib/lb_promo/assets/css/lb-promo.css
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
  3 | ERROR | [x] Closing brace of class definition must be on new line
  7 | ERROR | [x] Closing brace of class definition must be on new line
 11 | ERROR | [x] Closing brace of class definition must be on new line
 13 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /opt/lampp/htdocs/testing/web/modules/contrib/lb_promo/lb_promo.install
-----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------
 5 | WARNING | Line exceeds 80 characters; contains 88 characters
-----------------------------------------------------------------------------


FILE: /opt/lampp/htdocs/testing/web/modules/contrib/lb_promo/lb_promo.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 11 | WARNING | All dependencies must be prefixed with the project name, for
    |         | example "drupal:"
--------------------------------------------------------------------------------


FILE: /opt/lampp/htdocs/testing/web/modules/contrib/lb_promo/lb_promo.module
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------------
 10 | ERROR   | [x] Line indented incorrectly; expected 0 spaces, found 1
 11 | ERROR   | [x] Expected 2 space(s) before asterisk; 1 found
 12 | ERROR   | [x] Expected 2 space(s) before asterisk; 1 found
 32 | WARNING | [x] A comma should follow the last multiline array item. Found:
    |         |     ]
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 37ms; Memory: 10MB
📌 Task
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

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