Sort 'use' statements alphabetically.

Created on 7 July 2023, 12 months ago
Updated 21 August 2023, 10 months ago

Problem/Motivation

FILE: /home/lenovo/d7to9/web/modules/contrib/languages_dropdown/src/Plugin/Derivative/LangDropBootstrapDeriver.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------
  8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
 15 | ERROR | [x] Expected 2 spaces before interface name; 4 found
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/languages_dropdown/src/Plugin/Block/LangDropBootstrapBlock.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\NestedArray.
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/languages_dropdown/languages_dropdown.module
----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Routing\RouteMatchInterface.
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------

Time: 103ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig languages_dropdown/

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India roshni27

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024