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

Created on 11 July 2023, 12 months ago
Updated 7 February 2024, 5 months ago

Problem/Motivation

FILE: .../summary_only/src/Plugin/Field/FieldFormatter/TextSummaryOnlyFormatter.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
85 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------

Time: 104ms; Memory: 10MB

Steps to reproduce

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

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