Problem/Motivation

Getting the following errors.

FILE: /app/web/modules/contrib/currency_fixer_io/src/Plugin/Currency/ExchangeRateProvider/FixerIoOperationsProvider.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

FILE: /app/web/modules/contrib/currency_fixer_io/src/Service/FixerIo.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Logger\LoggerChannelFactoryInterface.
81 | 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
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

FILE: /app/web/modules/contrib/currency_fixer_io/src/Form/CurrencyFixerIoSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------

Time: 136ms; Memory: 12MB

after phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css web/modules/contrib/currency_fixer_io

FILE: /app/web/modules/contrib/currency_fixer_io/src/Service/FixerIo.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
81 | 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
---------------------------------------------------------------------------------------------

Time: 137ms; Memory: 12MB

Steps to reproduce

Run the following command

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

Proposed resolution

Above errors need to be fixed.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Pinesh Kumar created an issue. See original summary.

nilesh.addweb’s picture

Assigned: Unassigned » nilesh.addweb

nilesh.addweb’s picture

Assigned: nilesh.addweb » Unassigned
Status: Active » Needs review

Hi,
I have fixed phpcs issues and Created MR. Please review it.

bhaveshdas’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Coding standards
StatusFileSize
new26.55 KB

I have tested MR!4 and it is working properly with no errors found. I will move it forward to RTBC.