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

Created on 2 May 2023, over 1 year ago
Updated 19 May 2023, over 1 year ago

Problem/Motivation

FILE: /web/modules/contrib/google_sheets_table/src/GoogleSheetsApi.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------
143 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
163 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
183 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Run the phpcs command on the module. To check the Dependency Injection.

Remaining tasks

We need to inject core services into the class (Logger).

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshkumarbollu

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

Comments & Activities

Production build 0.71.5 2024