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

Created on 7 July 2023, 12 months ago
Updated 18 July 2023, 12 months ago

Problem/Motivation

FILE: ..._formatter/src/Plugin/Field/FieldFormatter/CopyMediaEmbedCodeFormatter.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
46 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
55 | 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
71 | 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 copy_formatter/

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