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

Created on 28 June 2023, over 1 year ago
Updated 19 September 2023, about 1 year ago

Problems/Motivation:

FILE: ...eb/modules/contrib/domain_language-3370924/src/Form/DomainLanguageForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
--------------------------------------------------------------------------------
36 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
39 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
42 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
46 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
50 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
84 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
128 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
148 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
160 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
175 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------

FILE: ...eb/modules/contrib/domain_language-3370924/src/DomainLanguageOverrider.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
82 | 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
104 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
166 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
167 | 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 domain_language/

Remaining Tasks:

Needs dependency injections to be injected in code.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India arti_parmar

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024