Problem/Motivation

FILE: /Users/a./Documents/Internal/Projects/d10contrib/web/modules/contrib/module_filter/module_filter.module
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------------------------------------------------------

Time: 165ms; Memory: 12MB

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml "module_path"

Proposed resolution

Resolve the PHPCS issues.

CommentFileSizeAuthor
#2 3402072-2.patch424 bytesshyam_bhatt

Comments

Shyam_Bhatt created an issue. See original summary.

shyam_bhatt’s picture

Assigned: shyam_bhatt » Unassigned
Status: Active » Needs review
StatusFileSize
new424 bytes

Here I am adding a solution patch to fix the above issue.

After applying the patch, run the below code:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml "module_path"

It will resolve all the issues from phpcs.

jonathan1055’s picture

Title: Fix the issues reported by phpcs » Fix 'use' order (new phpcs rule)

Thanks Shyam_Bhatt. Yes this is a new sniff added to Coder 8.3.19

smustgrave’s picture

Status: Needs review » Closed (duplicate)

Going to handle in another ticket and I find these credit farming ones detrimental to the community. Flagging for Drupal association