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

Created on 6 July 2023, 12 months ago
Updated 10 February 2024, 5 months ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/mosparo_integration/src/Service/MosparoService.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
116 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------

FILE: ...ion/modules/mosparo_contact/src/Plugin/Field/FieldWidget/MosparoWidget.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
33 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
34 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------

Time: 372ms; Memory: 12MB

Steps to reproduce

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

Remaining tasks

Patch review

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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

Comments & Activities

Production build 0.69.0 2024