Problem/Motivation

Getting following warnings.

FILE: /var/www/html/modules/contrib/cloudflare_node_cc/src/Commands/CloudflareCommands.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
345 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
392 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------

Time: 5.2 secs; Memory: 6MB

Steps to reproduce

Run following command

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

Proposed resolution

Above warnings need to be fixed.

CommentFileSizeAuthor
#2 3350527-2.patch2.69 KBsamitk

Comments

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.69 KB

Above warnings has been fixed.

avpaderno’s picture

Title: Drupal Coding Standards Issues | phpcs » Fix the issues reported by phpcs
Priority: Normal » Minor
Issue tags: -Coding standards Phpcs, -Phpcs Drupal coding standard issue

  • 2dc0b098 committed on 1.x
    Issue #3350527: Fix the issues reported by phpcs.
    
geoanders’s picture

Status: Needs review » Fixed

Thanks. Added to dev branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.