Fix the issues reported by phpcs on block_extras module

Created on 14 August 2023, over 1 year ago
Updated 16 August 2023, about 1 year ago

Problem/Motivation

after executing phpcs command getting below errors.

 ./vendor/bin/phpcs   --standard="Drupal,DrupalPractice"   --extensions="php,module,inc,install,test,profile,theme,info" web/modules/contrib/block_extras/
FILE: /home/shivsharma/project/test/web/modules/contrib/block_extras/block_extras.module
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------
  9 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\block_content\Entity\BlockContent.
 54 | WARNING | [x] A comma should follow the last multiline array item. Found: 'Block Extras'
 64 | WARNING | [x] A comma should follow the last multiline array item. Found: 'Block preview'
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------

Time: 167ms; Memory: 10MB

Steps to reproduce

Execute:

 ./vendor/bin/phpcs   --standard="Drupal,DrupalPractice"   --extensions="php,module,inc,install,test,profile,theme,info" web/modules/contrib/block_extras/
📌 Task
Status

Fixed

Version

1.0

Component

Miscellaneous

Created by

🇮🇳India Shiv_Sharma

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

Comments & Activities

Production build 0.71.5 2024