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.