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.