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

Created on 21 June 2022, over 2 years ago
Updated 15 February 2023, almost 2 years ago

Problem/Motivation

phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/onlyoffice/

FILE: C:\xampp\htdocs\contribute\web\modules\contrib\onlyoffice\src\Controller\OnlyofficeCallbackController.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------------
150 | 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
204 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
206 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
237 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
261 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
277 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribute\web\modules\contrib\onlyoffice\src\Controller\OnlyofficeDownloadController.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------
87 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
98 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
116 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribute\web\modules\contrib\onlyoffice\src\Controller\OnlyofficeEditorController.php
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------
121 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
131 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
135 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
143 | 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
-------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribute\web\modules\contrib\onlyoffice\src\Plugin\Field\FieldFormatter\OnlyofficePreviewFormatter.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------
177 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
178 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------

Time: 426ms; Memory: 8MB

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Ashutosh Ahirwal India

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024