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

Created on 20 June 2023, over 1 year ago
Updated 21 June 2023, over 1 year ago

FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\imce\src\Controller\ImceFrameController.php
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇮🇳India arti_parmar

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

Comments & Activities

  • Issue created by @arti_parmar
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    55 pass
  • 🇮🇳India arti_parmar

    Kindly review patch.

  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines kenyoOwen

    Hi arti_parmar

    I applied your patch and confirmed that the phpcs issue mentioned is resolved, but it added a new issue which is:
    FILE: /Users/studenttrainees/Project10/drupalorg10/docroot/modules/contrib/imce/src/Controller/ImceFrameController.php
    ----------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------
    26 | ERROR | [x] Whitespace found at end of line
    ----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------

    Please see the screenshots attached.

    Thank you.

  • Status changed to Needs review over 1 year ago
  • Status changed to RTBC over 1 year ago
  • 🇮🇳India arti_parmar

    Hi @kenyoOwen,
    This issue will be automatic fix by PHPCBF, please run with PHPCBF command and then check all issues will be resolved.
    Thankyou.

Production build 0.71.5 2024