\Drupal calls should be avoided in classes, use dependency injection instead

Created on 18 July 2023, 12 months ago

Problem/Motivation

FILE: ...home/lenovo/d7to9/web/modules/contrib/layout_paragraphs/tests/modules/layout_paragraphs_custom_host_entity_test/src/Form/LpHostEntityForm.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------------
 23 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /home/lenovo/d7to9/web/modules/contrib/layout_paragraphs/src/Plugin/Field/FieldWidget/LayoutParagraphsWidget.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERROR AND 1 WARNING AFFECTING 1 LINES
----------------------------------------------------------------------------------------------------------------------------------
 311 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

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

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇳India roshni27

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

Comments & Activities

Production build 0.69.0 2024