Problem/Motivation

administrator@admin:/var/www/html/my-drupal10-site$ vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /var/www/html/my-drupal10-site/web/modules/contrib/find_external_links/
FILE: /var/www/html/my-drupal10-site/web/modules/contrib/find_external_links/src/Controller/FindExternalLinksController.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Render\FormattableMarkup.
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/my-drupal10-site/web/modules/contrib/find_external_links/src/Form/ConfigurationForm.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Database\Connection.
219 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /var/www/html/my-drupal10-site/web/modules/contrib/find_external_links/

Proposed resolution

Run this command

vendor/bin/phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /var/www/html/my-drupal10-site/web/modules/contrib/find_external_links/

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
image (2).png73.53 KBnishant
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

Nishant created an issue. See original summary.

Rajan Kumar made their first commit to this issue’s fork.

rajan kumar’s picture

Status: Needs work » Fixed

I have fixed it in latest version.

rajan kumar’s picture

Status: Fixed » Closed (fixed)