\Drupal calls should be avoided in classes

Created on 30 June 2023, over 1 year ago

Problem/Motivation

\Drupal calls should be avoided in classes.

FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------------
19 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
23 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
25 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
40 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
45 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\know-how\modules\custom\swagger_ui_info\src\Form\SwaggerUiSettingsForm.php
------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
------------------------------------------------------------------------------------------------
25 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
26 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
63 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
80 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
82 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
85 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
86 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
87 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
91 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
92 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------

Proposed resolution

Remove all the Drupal calls Instead Add dependency injections.

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India Prachi6824

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

Comments & Activities

Production build 0.71.5 2024