Global constants should not be used, move it to a class or interface

Created on 30 May 2023, almost 2 years ago

Problem/Motivation

Remove WARNING | Global constants should not be used, move it to a class or interface

Steps to reproduce

Run the command:

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

Proposed resolution

Fix the following coding standards issues and upload the patch or create an MR with fixes.

FILE: C:\xampp\htdocs\drupal_9\web\modules\contrib\layout_builder_paragraphs\layout_builder_paragraphs.module
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
18 | WARNING | Global constants should not be used, move it to a class or interface
-------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\drupal_9\web\modules\contrib\layout_builder_paragraphs\src\Controller\SuiteChooseBlockController.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
100 | WARNING | There must be no blank line following an inline comment
--------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\drupal_9\web\modules\contrib\layout_builder_paragraphs\src\Form\AddParagraphForm.php
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------
24 | WARNING | There must be no blank line following an inline comment
82 | WARNING | Unused variable $contexts.
153 | WARNING | Unused variable $key.
188 | WARNING | There must be no blank line following an inline comment
----------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\drupal_9\web\modules\contrib\layout_builder_paragraphs\src\Routing\RouteSubscriber.php
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------
31 | WARNING | There must be no blank line following an inline comment
36 | WARNING | There must be no blank line following an inline comment
41 | WARNING | There must be no blank line following an inline comment
------------------------------------------------------------------------------------------------------------

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India arti_parmar

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

Comments & Activities

Production build 0.71.5 2024