Fix the issues reported by phpcs

Created on 1 March 2023, over 1 year ago
Updated 3 July 2023, over 1 year ago

Problem/Motivation

The module doesn't follow proper coding standards as per Drupal and DrupalPractice.

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 lb_related_events_blocks/

Proposed resolution

Fix all the issues reported by PHPCS

Remaining tasks

FIx the following:
FILE: ...ontribution/drupal8/web/modules/contrib/lb_related_events_blocks/README.md
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
3 | WARNING | [ ] Line exceeds 80 characters; contains 99 characters
54 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...b/modules/contrib/lb_related_events_blocks/lb_related_events_blocks.module
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------
181 | ERROR | [x] The first index in a multi-value array must be on a new line
183 | ERROR | [x] Closing parenthesis of array declaration must be on a new
| | line
184 | ERROR | [x] The first index in a multi-value array must be on a new line
186 | ERROR | [x] Closing parenthesis of array declaration must be on a new
| | line
198 | ERROR | [x] The first index in a multi-value array must be on a new line
200 | ERROR | [x] Closing parenthesis of array declaration must be on a new
| | line
201 | ERROR | [x] The first index in a multi-value array must be on a new line
203 | ERROR | [x] Closing parenthesis of array declaration must be on a new
| | line
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: .../modules/contrib/lb_related_events_blocks/lb_related_events_blocks.install
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
5 | ERROR | [x] Function comment short description must start with exactly
| | one space
6 | ERROR | [x] There must be exactly one blank line after the file comment
12 | ERROR | [x] Expected 1 blank line before function; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...les/contrib/lb_related_events_blocks/assets/css/lb-related-events-node.css
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------

FILE: ...es/contrib/lb_related_events_blocks/assets/css/lb-related-events-block.css
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------

FILE: ...modules/contrib/lb_related_events_blocks/lb_related_events_blocks.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
10 | WARNING | All dependencies must be prefixed with the project name, for
| | example "drupal:"
11 | WARNING | All dependencies must be prefixed with the project name, for
| | example "drupal:"
12 | WARNING | All dependencies must be prefixed with the project name, for
| | example "drupal:"
--------------------------------------------------------------------------------

Time: 612ms; Memory: 10MB

📌 Task
Status

Closed: outdated

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

  • Issue created by @urvashi_vora
  • 🇮🇳India urvashi_vora Madhya Pradesh, India

    Fixed all the issues reported by PHPCS

    urvasi@urvasi-Inspiron-15-3552:/var/www/html/contribution/drupal/web/modules/contrib$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig lb_related_events_blocks-3345159/
    urvasi@urvasi-Inspiron-15-3552:/var/www/html/contribution/drupal/web/modules/contrib$

    Committing the changes. Please review.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • @urvashi_vora opened merge request.
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India urvashi_vora Madhya Pradesh, India

    @podarok, thanks for guiding.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • First commit to issue fork.
  • @shivam_tiwari opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India nayana_mvr

    Verified MR!7. The patch applied cleanly with a warning message:

    7.diff:10: trailing whitespace.
    Layout Builder Related Events Blocks is a Helper module for the custom 
    Checking patch README.md...
    Checking patch lb_related_events_blocks.install...
    Checking patch lb_related_events_blocks.module...
    Applied patch README.md cleanly.
    Applied patch lb_related_events_blocks.install cleanly.
    Applied patch lb_related_events_blocks.module cleanly.
    warning: 1 line adds whitespace errors.

    Also, there are few more errors to be fixed.

    FILE: .../contrib/lb_related_events_blocks/lb_related_events_blocks.info.yml
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    -----------------------------------------------------------------------------------------------------------------------------
     10 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     11 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
     12 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
    -----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: .../contrib/lb_related_events_blocks/assets/css/lb-related-events-node.css
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    ---------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: .../contrib/lb_related_events_blocks/assets/css/lb-related-events-block.css
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    ----------------------------------------------------------------------------------------------------------------------------------
    
    Time: 174ms; Memory: 12MB
    
  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs review over 1 year ago
  • Status changed to Closed: outdated over 1 year ago
Production build 0.71.5 2024